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:
parent
3e2c0f2e6a
commit
33a38f4ec6
@ -27,16 +27,10 @@ if(ENABLE_GLOG_AND_GFLAGS)
|
||||
target_compile_definitions(gnss-sdr PUBLIC -DUSE_GLOG_AND_GFLAGS=1)
|
||||
else()
|
||||
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)
|
||||
message(STATUS "Internal logging is not enabled")
|
||||
if(CMAKE_VERSION VERSION_GREATER 3.11.0)
|
||||
target_compile_definitions(gnss-sdr INTERFACE -DABSL_MIN_LOG_LEVEL=3)
|
||||
else()
|
||||
set_property(TARGET gnss-sdr APPEND PROPERTY
|
||||
INTERFACE_COMPILE_DEFINITIONS ABSL_MIN_LOG_LEVEL=3
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT ENABLE_LOG)
|
||||
target_compile_definitions(gnss-sdr PRIVATE -DGOOGLE_STRIP_LOG=1)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(gnss-sdr PRIVATE -DGNSS_SDR_VERSION="${VERSION}")
|
||||
@ -71,10 +65,6 @@ if(ENABLE_GPERFTOOLS)
|
||||
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_CXX_COMPILER_ID MATCHES "Clang")
|
||||
target_link_libraries(gnss-sdr PRIVATE "-lc++")
|
||||
|
Loading…
Reference in New Issue
Block a user