Don't compile cpuid test with INTRINSICS_CXXFLAGS

This will compile test with maximal supported instruction set
supported by the compiler, but the CPU might not support the
instructions sets. As this tests some aspects of runtime CPU
detection only we actually don't need to compile it with the
INTRINSICS_CXXFLAGS flags.

Change-Id: I612785949b42efbd08d1961a746025f66e99aebc
Reviewed-on: https://gerrit.libreoffice.org/82422
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This commit is contained in:
Tomaž Vajngerl
2019-11-11 10:59:03 +01:00
committed by Tomaž Vajngerl
parent a1cba2d4db
commit c13a664c5f
2 changed files with 1 additions and 20 deletions

View File

@@ -30,10 +30,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,tools_test, \
tools/qa/cppunit/test_fround \ tools/qa/cppunit/test_fround \
tools/qa/cppunit/test_xmlwalker \ tools/qa/cppunit/test_xmlwalker \
tools/qa/cppunit/test_GenericTypeSerializer \ tools/qa/cppunit/test_GenericTypeSerializer \
)) tools/qa/cppunit/test_cpuid \
$(eval $(call gb_CppunitTest_add_exception_objects,tools_test,\
tools/qa/cppunit/test_cpuid, $(INTRINSICS_CXXFLAGS) \
)) ))
$(eval $(call gb_CppunitTest_use_sdk_api,tools_test)) $(eval $(call gb_CppunitTest_use_sdk_api,tools_test))

View File

@@ -12,7 +12,6 @@
#include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h> #include <cppunit/plugin/TestPlugIn.h>
#include <tools/cpuid.hxx> #include <tools/cpuid.hxx>
#include <tools/simd.hxx>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
namespace namespace
@@ -50,21 +49,6 @@ void CpuInstructionSetSupport::testCpuInstructionSetSupport()
{ {
CPPUNIT_ASSERT(aString.indexOf("AVX2") > 0); CPPUNIT_ASSERT(aString.indexOf("AVX2") > 0);
} }
#ifdef LO_SSE2_AVAILABLE
CPPUNIT_ASSERT_EQUAL(cpuid::hasSSE2(),
cpuid::isCpuInstructionSetSupported(cpuid::InstructionSetFlags::SSE2));
#endif
#ifdef LO_SSSE3_AVAILABLE
CPPUNIT_ASSERT_EQUAL(cpuid::hasSSSE3(),
cpuid::isCpuInstructionSetSupported(cpuid::InstructionSetFlags::SSE2));
#endif
#ifdef LO_AVX2_AVAILABLE
CPPUNIT_ASSERT_EQUAL(cpuid::hasAVX2(),
cpuid::isCpuInstructionSetSupported(cpuid::InstructionSetFlags::AVX2));
#endif
} }
CPPUNIT_TEST_SUITE_REGISTRATION(CpuInstructionSetSupport); CPPUNIT_TEST_SUITE_REGISTRATION(CpuInstructionSetSupport);