aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmake/cpu.cmake
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-08-27 15:59:30 +0200
committerDamjan Marion <damarion@cisco.com>2018-08-27 16:00:17 +0200
commit33ed3e4c7d0fa1335642ad45e4e52c7ba15cded6 (patch)
tree1e31042e398c19a4dba078f248d296823f1419f5 /src/cmake/cpu.cmake
parent917dc3b39dca1ddd0b268076d02cf15cf3e3de0c (diff)
cmake: fix clang build and few minor fixes
Change-Id: If5b850c939f7a5383f9a7eff8ac41708c3428a90 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/cmake/cpu.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.*)")