Skip to content

Commit

Permalink
Do not compile for XOP+FMA4 if compiler cannot do it
Browse files Browse the repository at this point in the history
Fixes the warning below when building with the Intel compiler:

CMake Warning at cmake/VcMacros.cmake:503 (message):
  The following unknown targets where listed in the ONLY list of
  vc_compile_for_all_implementations: 'SSE+XOP+FMA4;AVX+XOP+FMA4;AVX+XOP+FMA'
Call Stack (most recent call first):
  CMakeLists.txt:121 (vc_compile_for_all_implementations)
  • Loading branch information
amadio authored and bernhardmgruber committed Apr 13, 2022
1 parent 2c9e21b commit 6125a37
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,13 @@ AddCompilerFlag("-fstack-protector" CXX_FLAGS libvc_compile_flags)
set(_srcs src/const.cpp)
if(Vc_X86)
list(APPEND _srcs src/cpuid.cpp src/support_x86.cpp)
vc_compile_for_all_implementations(_srcs src/trigonometric.cpp ONLY SSE2 SSE3 SSSE3 SSE4_1 AVX SSE+XOP+FMA4 AVX+XOP+FMA4 AVX+XOP+FMA AVX+FMA AVX2+FMA+BMI2)
vc_compile_for_all_implementations(_srcs src/trigonometric.cpp ONLY SSE2 SSE3 SSSE3 SSE4_1 AVX AVX+FMA AVX2+FMA+BMI2)
if(NOT Vc_XOP_INTRINSICS_BROKEN)
vc_compile_for_all_implementations(_srcs src/trigonometric.cpp ONLY AVX+XOP+FMA)
if(NOT Vc_FMA4_INTRINSICS_BROKEN)
vc_compile_for_all_implementations(_srcs src/trigonometric.cpp ONLY SSE+XOP+FMA4 AVX+XOP+FMA4)
endif()
endif()
vc_compile_for_all_implementations(_srcs src/sse_sorthelper.cpp ONLY SSE2 SSE4_1 AVX AVX2+FMA+BMI2)
vc_compile_for_all_implementations(_srcs src/avx_sorthelper.cpp ONLY AVX AVX2+FMA+BMI2)
elseif(Vc_ARM)
Expand Down

0 comments on commit 6125a37

Please sign in to comment.