diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f85a621e..dd97b7508 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2525,7 +2525,13 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32) if(OS_IS_MACOSX) add_compile_options(-march=corei7 -mfpmath=sse) else() - if(NOT IS_ARM) + if(IS_ARM) + # ARM-specific options + # See https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html + if(NOT CMAKE_CROSSCOMPILING) + add_compile_options(-mcpu=native) + endif() + else() add_compile_options(-march=native -mfpmath=sse) endif() endif()