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
@ -2520,18 +2520,30 @@ endif()
|
|||||||
# Processor-architecture related flags
|
# Processor-architecture related flags
|
||||||
# See https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
|
# See https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
|
||||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||||
|
if(NOT ENABLE_GENERIC_ARCH)
|
||||||
|
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(NOT ENABLE_GENERIC_ARCH)
|
||||||
if(OS_IS_MACOSX)
|
if(OS_IS_MACOSX)
|
||||||
add_compile_options(-march=corei7 -mfpmath=sse)
|
add_compile_options(-march=native)
|
||||||
else()
|
else()
|
||||||
if(IS_ARM)
|
if(IS_ARM)
|
||||||
# ARM-specific options
|
# ARM-specific options
|
||||||
# See https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
|
|
||||||
if(NOT CMAKE_CROSSCOMPILING AND NOT CMAKE_TOOLCHAIN_FILE)
|
if(NOT CMAKE_CROSSCOMPILING AND NOT CMAKE_TOOLCHAIN_FILE)
|
||||||
add_compile_options(-mcpu=native)
|
add_compile_options(-mcpu=native)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
add_compile_options(-march=native -mfpmath=sse)
|
add_compile_options(-march=native)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user