mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-15 03:35:46 +00:00
Add compiler flags for clang
This commit is contained in:
parent
75c2dcc929
commit
87974a9456
@ -2521,17 +2521,29 @@ endif()
|
||||
# See https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||
if(NOT ENABLE_GENERIC_ARCH)
|
||||
if(OS_IS_MACOSX)
|
||||
add_compile_options(-march=corei7 -mfpmath=sse)
|
||||
else()
|
||||
if(IS_ARM)
|
||||
# ARM-specific options
|
||||
# See https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
|
||||
if(NOT CMAKE_CROSSCOMPILING AND NOT CMAKE_TOOLCHAIN_FILE)
|
||||
add_compile_options(-mtune=native)
|
||||
endif()
|
||||
else()
|
||||
add_compile_options(-march=native)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
if(NOT ENABLE_GENERIC_ARCH)
|
||||
if(OS_IS_MACOSX)
|
||||
add_compile_options(-march=native)
|
||||
else()
|
||||
if(IS_ARM)
|
||||
# ARM-specific options
|
||||
if(NOT CMAKE_CROSSCOMPILING AND NOT CMAKE_TOOLCHAIN_FILE)
|
||||
add_compile_options(-mcpu=native)
|
||||
endif()
|
||||
else()
|
||||
add_compile_options(-march=native -mfpmath=sse)
|
||||
add_compile_options(-march=native)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user