Add work on compiler flags

This commit is contained in:
Carles Fernandez 2019-11-01 20:16:21 +01:00
parent 8bfc0b8085
commit c92e0cb5c0
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
1 changed files with 7 additions and 1 deletions

View File

@ -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()