Merge pull request #344 from xhochy/no-march-native-apple

Don't set march=native on Apple Silicon
This commit is contained in:
Daan 2020-12-17 14:04:58 -08:00 committed by GitHub
commit b650aa9021
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23

View file

@ -186,8 +186,11 @@ if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang|GNU|Intel" AND NOT CMAKE_SYSTEM
endif() endif()
# Architecture flags # Architecture flags
if(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "arm") if(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "arm" AND NOT APPLE)
list(APPEND mi_cflags -march=native) check_cxx_compiler_flag(-march=native CXX_SUPPORTS_MARCH_NATIVE)
if (CXX_SUPPORTS_MARCH_NATIVE)
list(APPEND mi_cflags -march=native)
endif()
endif() endif()
# extra needed libraries # extra needed libraries