Skip to content

Commit cf8abee

Browse files
committed
Update torque_macros.cmake
1 parent 0353e62 commit cf8abee

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Tools/CMake/torque_macros.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,11 @@ function(add_math_backend name compile_defs)
176176
elseif(name STREQUAL "avx2")
177177
target_compile_options(math_${name} PRIVATE -mavx2 -mfma)
178178
elseif(name STREQUAL "neon")
179-
target_compile_options(math_${name} PRIVATE -march=armv8-a)
179+
include(CheckCXXCompilerFlag)
180+
check_cxx_compiler_flag("-march=armv8-a" HAS_ARMV8_FLAG)
181+
if(HAS_ARMV8_FLAG)
182+
target_compile_options(math_${name} PRIVATE -march=armv8-a)
183+
endif()
180184
endif()
181185
endif()
182186

0 commit comments

Comments
 (0)