From f53ffa886d1172dbbc338f0f2b25c3e2b097b2dd Mon Sep 17 00:00:00 2001 From: Morgan Funtowicz Date: Mon, 8 Jul 2024 22:06:49 +0000 Subject: [PATCH] Specify which default log level to use depending on CMake build type --- backends/trtllm/cmake/spdlog.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backends/trtllm/cmake/spdlog.cmake b/backends/trtllm/cmake/spdlog.cmake index fe6cbc0c..857a5abc 100644 --- a/backends/trtllm/cmake/spdlog.cmake +++ b/backends/trtllm/cmake/spdlog.cmake @@ -1,4 +1,12 @@ set(SPDLOG_USE_FMT ON) + +# Define the level at which SPDLOG_ compilation level is defined +if(${CMAKE_BUILD_TYPE} STREQUAL "Debug") + add_compile_definitions(SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_DEBUG) +else() + add_compile_definitions(SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_INFO) +endif() + fetchcontent_declare( spdlog GIT_REPOSITORY https://github.com/gabime/spdlog.git