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

18 lines
554 B
CMake
Raw Normal View History

set(SPDLOG_USE_FMT ON)
set(SPDLOG_BUILD_SHARED ON)
2024-11-07 23:53:53 +00:00
set(SPDLOG_FMT_EXTERNAL OFF)
# Define the level at which SPDLOG_ compilation level is defined
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
2024-10-04 08:42:31 +00:00
message(STATUS "Verbose logging is enabled in debug build")
add_compile_definitions(SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_DEBUG)
else ()
2024-10-04 08:42:31 +00: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)