Skip to content

Commit 8889d23

Browse files
committed
gha: build - only enable march=core2/sse4.2 on x86 architecture
1 parent f02ccf8 commit 8889d23

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmake/Common.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,10 @@ else()
640640
endif()
641641

642642
if (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
643-
add_compile_options(-pipe -fpermissive -fopenmp -march=core2 -O2 -msse4.2)
643+
add_compile_options(-pipe -fpermissive -fopenmp)
644+
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)")
645+
add_compile_options(-march=core2 -msse4.2)
646+
endif()
644647
add_link_options(-fopenmp)
645648

646649
if (NOT "${openiA_AVX_SUPPORT}" STREQUAL "${openiA_AVX_SUPPORT_DISABLED}")

0 commit comments

Comments
 (0)