mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-27 01:14:51 +00:00
Improve compilation options
This commit is contained in:
parent
ccf575de86
commit
d2a3de3c58
@ -1862,7 +1862,14 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
|||||||
# Add warning flags
|
# Add warning flags
|
||||||
# For "-Wall" see https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
|
# For "-Wall" see https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
|
||||||
set(cxx_warning_flags -Wall -Wextra)
|
set(cxx_warning_flags -Wall -Wextra)
|
||||||
add_compile_options("$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:${cxx_warning_flags}>")
|
if(NOT (CMAKE_VERSION VERSION_LESS "3.3"))
|
||||||
|
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:${cxx_warning_flags}>")
|
||||||
|
else()
|
||||||
|
add_compile_options("$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:${cxx_warning_flags}>")
|
||||||
|
endif()
|
||||||
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0")
|
||||||
|
add_compile_options(-Wno-missing-field-initializers)
|
||||||
|
endif()
|
||||||
if(CMAKE_CROSSCOMPILING)
|
if(CMAKE_CROSSCOMPILING)
|
||||||
add_compile_options(-Wno-psabi)
|
add_compile_options(-Wno-psabi)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user