hf_text-generation-inference/backends/llamacpp/cmake/spdlog.cmake

24 lines
743 B
CMake
Raw Normal View History

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 ()
# Define the level at which SPDLOG_ compilation level is defined
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)
else ()
2024-10-04 02:42:31 -06:00
add_compile_definitions(SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_INFO)
endif ()
fetchcontent_declare(
spdlog
URL https://github.com/gabime/spdlog/archive/refs/tags/v1.14.1.tar.gz
)
fetchcontent_makeavailable(spdlog)