mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-18 21:23:02 +00:00
Use target_compile_options instead of CMAKE_C_FLAGS
This commit is contained in:
parent
c2c701d885
commit
226689c359
@ -16,15 +16,6 @@ list(SORT ASN_SUPL_SOURCES)
|
||||
file(GLOB ASN_SUPL_HEADERS "${CMAKE_SOURCE_DIR}/src/core/libs/supl/asn-supl/*.h")
|
||||
list(SORT ASN_SUPL_HEADERS)
|
||||
|
||||
set(MY_C_FLAGS "")
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
if(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
set(MY_C_FLAGS "${MY_C_FLAGS} -Wno-parentheses-equality")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MY_C_FLAGS}")
|
||||
|
||||
if(CMAKE_VERSION VERSION_GREATER 3.13)
|
||||
add_library(core_libs_supl STATIC)
|
||||
target_sources(core_libs_supl
|
||||
@ -46,6 +37,13 @@ else()
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
if(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
set(MY_C_FLAGS -Wno-parentheses-equality)
|
||||
target_compile_options(core_libs_supl PUBLIC $<$<COMPILE_LANGUAGE:C>:${MY_C_FLAGS}>)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(OPENSSL_FOUND)
|
||||
target_compile_definitions(core_libs_supl PUBLIC -DUSE_OPENSSL_FALLBACK=1)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user