Fix compiler flags when using CMAKE_TOOLCHAIN_FILE in ARM processors

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

View File

@ -2528,7 +2528,7 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
if(IS_ARM)
# ARM-specific options
# See https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
if(NOT CMAKE_CROSSCOMPILING)
if(NOT CMAKE_CROSSCOMPILING AND NOT CMAKE_TOOLCHAIN_FILE)
add_compile_options(-mcpu=native)
endif()
else()