1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-12 19:20:32 +00:00

Fix ENABLE_LOG=OFF option

This commit is contained in:
Carles Fernandez 2024-05-01 09:52:48 +02:00
parent 3e2c0f2e6a
commit 33a38f4ec6
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -27,16 +27,10 @@ if(ENABLE_GLOG_AND_GFLAGS)
target_compile_definitions(gnss-sdr PUBLIC -DUSE_GLOG_AND_GFLAGS=1) target_compile_definitions(gnss-sdr PUBLIC -DUSE_GLOG_AND_GFLAGS=1)
else() else()
target_link_libraries(gnss-sdr PRIVATE absl::flags absl::flags_parse absl::log absl::log_initialize absl::log_sink absl::log_sink_registry) target_link_libraries(gnss-sdr PRIVATE absl::flags absl::flags_parse absl::log absl::log_initialize absl::log_sink absl::log_sink_registry)
if(NOT ENABLE_LOG) endif()
message(STATUS "Internal logging is not enabled")
if(CMAKE_VERSION VERSION_GREATER 3.11.0) if(NOT ENABLE_LOG)
target_compile_definitions(gnss-sdr INTERFACE -DABSL_MIN_LOG_LEVEL=3) target_compile_definitions(gnss-sdr PRIVATE -DGOOGLE_STRIP_LOG=1)
else()
set_property(TARGET gnss-sdr APPEND PROPERTY
INTERFACE_COMPILE_DEFINITIONS ABSL_MIN_LOG_LEVEL=3
)
endif()
endif()
endif() endif()
target_compile_definitions(gnss-sdr PRIVATE -DGNSS_SDR_VERSION="${VERSION}") target_compile_definitions(gnss-sdr PRIVATE -DGNSS_SDR_VERSION="${VERSION}")
@ -71,10 +65,6 @@ if(ENABLE_GPERFTOOLS)
endif() endif()
endif() endif()
if(NOT ENABLE_LOG)
target_compile_definitions(gnss-sdr PRIVATE -DABSL_MIN_LOG_LEVEL=3)
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_link_libraries(gnss-sdr PRIVATE "-lc++") target_link_libraries(gnss-sdr PRIVATE "-lc++")