Do not use the -match=native flag. --- CMakeLists.txt +++ CMakeLists.txt @@ -57,12 +57,6 @@ endif() if(NOT MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra ${LIBFIVE_DEBUGGING}-fPIC -pedantic -Werror=switch") - # Sometimes this flag is not supported (e.g. on Apple Silicon) - check_cxx_compiler_flag("-march=native" MARCH_SUPPORTED) - if(MARCH_SUPPORTED) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") - endif() - set(CMAKE_CXX_FLAGS_DEBUG "-O0") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -DEIGEN_NO_DEBUG") else()