Skip to content

Commit ddd003f

Browse files
authored
Update AddSwiftUnittests.cmake
1 parent 525f408 commit ddd003f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cmake/modules/AddSwiftUnittests.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ function(add_swift_unittest test_dirname)
4848
"${android_system_libs}")
4949
set_property(TARGET "${test_dirname}" APPEND PROPERTY LINK_LIBRARIES "log")
5050
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
51-
set_property(TARGET "${test_dirname}" APPEND PROPERTY COMPILE_FLAGS
52-
" -march=core2")
51+
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64")
52+
set_property(TARGET "${test_dirname}" APPEND_STRING PROPERTY COMPILE_FLAGS
53+
" -march=core2")
54+
endif()
5355
endif()
5456

5557
find_program(LDLLD_PATH "ld.lld")

0 commit comments

Comments
 (0)