From 163be37f0383a5ee37503e91cd4c42094c7577dd Mon Sep 17 00:00:00 2001 From: presburger Date: Thu, 16 Mar 2023 15:23:51 +0800 Subject: [PATCH] disable debug log when build release version (#743) Signed-off-by: Yusheng.Ma --- cmake/libs/libeasylogging.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/libs/libeasylogging.cmake b/cmake/libs/libeasylogging.cmake index 3155e489e..3a5859eda 100644 --- a/cmake/libs/libeasylogging.cmake +++ b/cmake/libs/libeasylogging.cmake @@ -1,4 +1,8 @@ add_definitions(-DAUTO_INITIALIZE_EASYLOGGINGPP) add_definitions(-DELPP_THREAD_SAFE) +if("${CMAKE_BUILD_TYPE}" STREQUAL "Release") + add_definitions(-DELPP_DISABLE_DEBUG_LOGS) +endif() + include_directories(thirdparty/easyloggingpp/src) add_library(easyloggingpp STATIC thirdparty/easyloggingpp/src/easylogging++.cc)