aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmake')
-rw-r--r--src/cmake/cpu.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmake/cpu.cmake b/src/cmake/cpu.cmake
index 9a0dfdd5bcb..0e1171de3ea 100644
--- a/src/cmake/cpu.cmake
+++ b/src/cmake/cpu.cmake
@@ -17,12 +17,12 @@
if(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
set(CMAKE_C_FLAGS "-march=corei7 -mtune=corei7-avx ${CMAKE_C_FLAGS}")
set(VPP_LIB_DIR_NAME lib64)
- check_c_compiler_flag("-march=core-avx2" AVX2)
- if(AVX2)
+ check_c_compiler_flag("-march=core-avx2" compiler_flag_march_core_avx2)
+ if(compiler_flag_march_core_avx2)
list(APPEND MARCH_VARIANTS "avx2\;-march=core-avx2 -mtune=core-avx2")
endif()
- check_c_compiler_flag("-march=skylake-avx512" AVX512)
- if(AVX512)
+ check_c_compiler_flag("-march=skylake-avx512" compiler_flag_march_skylake_avx512)
+ if(compiler_flag_march_skylake_avx512)
list(APPEND MARCH_VARIANTS "avx512\;-march=skylake-avx512 -mtune=skylake-avx512")
endif()
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)")