From c13a664c5fc1a24a5cdb4862b16d73b95ff797c7 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Mon, 11 Nov 2019 10:59:03 +0100 Subject: Don't compile cpuid test with INTRINSICS_CXXFLAGS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tools/CppunitTest_tools_test.mk | 5 +---- tools/qa/cppunit/test_cpuid.cxx | 16 ---------------- 2 files changed, 1 insertion(+), 20 deletions(-) (limited to 'tools') diff --git a/tools/CppunitTest_tools_test.mk b/tools/CppunitTest_tools_test.mk index 65f6d02fd782..5672be53353f 100644 --- a/tools/CppunitTest_tools_test.mk +++ b/tools/CppunitTest_tools_test.mk @@ -30,10 +30,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,tools_test, \ tools/qa/cppunit/test_fround \ tools/qa/cppunit/test_xmlwalker \ tools/qa/cppunit/test_GenericTypeSerializer \ -)) - -$(eval $(call gb_CppunitTest_add_exception_objects,tools_test,\ - tools/qa/cppunit/test_cpuid, $(INTRINSICS_CXXFLAGS) \ + tools/qa/cppunit/test_cpuid \ )) $(eval $(call gb_CppunitTest_use_sdk_api,tools_test)) diff --git a/tools/qa/cppunit/test_cpuid.cxx b/tools/qa/cppunit/test_cpuid.cxx index fdb19d0ec133..cb9c1b9a7fb6 100644 --- a/tools/qa/cppunit/test_cpuid.cxx +++ b/tools/qa/cppunit/test_cpuid.cxx @@ -12,7 +12,6 @@ #include #include #include -#include #include namespace @@ -50,21 +49,6 @@ void CpuInstructionSetSupport::testCpuInstructionSetSupport() { 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); -- cgit