2024-10-03 06:00:17 -06:00
|
|
|
set(SPDLOG_USE_FMT ON)
|
2024-11-14 01:38:13 -07:00
|
|
|
set(SPDLOG_BUILD_SHARED OFF)
|
2024-11-07 16:53:53 -07:00
|
|
|
set(SPDLOG_FMT_EXTERNAL OFF)
|
2024-11-14 01:38:13 -07:00
|
|
|
set(SPDLOG_INSTALL ON)
|
|
|
|
set(SPDLOG_NO_ATOMIC_LEVELS ON) # We are not modifying log levels concurrently
|
|
|
|
|
|
|
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
|
|
|
set(SPDLOG_CLOCK_COARSE ON)
|
|
|
|
endif ()
|
2024-10-03 06:00:17 -06:00
|
|
|
|
|
|
|
# Define the level at which SPDLOG_ compilation level is defined
|
2024-10-03 07:25:15 -06:00
|
|
|
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
2024-10-04 02:42:31 -06:00
|
|
|
message(STATUS "Verbose logging is enabled in debug build")
|
|
|
|
add_compile_definitions(SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_DEBUG)
|
2024-11-05 15:46:52 -07:00
|
|
|
else ()
|
2024-10-04 02:42:31 -06:00
|
|
|
add_compile_definitions(SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_INFO)
|
2024-10-03 06:00:17 -06:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
fetchcontent_declare(
|
|
|
|
spdlog
|
2024-11-05 15:46:52 -07:00
|
|
|
URL https://github.com/gabime/spdlog/archive/refs/tags/v1.14.1.tar.gz
|
2024-10-03 06:00:17 -06:00
|
|
|
)
|
|
|
|
fetchcontent_makeavailable(spdlog)
|