Skip to content

Commit 304a3a2

Browse files
committed
Disable verbose debug logging in standalone linux builds
1 parent 067b5ed commit 304a3a2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ else()
122122
endif()
123123
set(LSL_VERSION_INFO "\"git:${lslgitrevision}/branch:${lslgitbranch}/build:${CMAKE_BUILD_TYPE}/compiler:${CMAKE_CXX_COMPILER_ID}-${CMAKE_CXX_COMPILER_VERSION}/boost:\" BOOST_LIB_VERSION")
124124
set_source_files_properties("src/common.cpp" PROPERTIES COMPILE_DEFINITIONS LSL_LIBRARY_INFO_STR=${LSL_VERSION_INFO})
125+
set_source_files_properties("src/loguru/loguru.cpp" PROPERTIES COMPILE_DEFINITIONS LOGURU_STACKTRACES=$<BOOL:${LSL_DEBUGLOG}>)
125126

126127

127128
## create the lslboost target
@@ -171,7 +172,6 @@ target_include_directories(lslobj
171172
target_compile_definitions(lslobj
172173
PRIVATE LIBLSL_EXPORTS $<$<PLATFORM_ID:Windows>:_CRT_SECURE_NO_WARNINGS>
173174
LOGURU_DEBUG_LOGGING=$<BOOL:${LSL_DEBUGLOG}>
174-
LOGURU_STACKTRACES=$<BOOL:${LSL_DEBUGLOG}>
175175
INTERFACE LSLNOAUTOLINK # don't use #pragma(lib) in CMake builds
176176
)
177177

standalone_compilation_linux.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ set -x
1010
echo ${LSLGITREVISION:="$(git describe --tags HEAD)"}
1111
${CXX:-g++} -fPIC -fvisibility=hidden -O2 ${CFLAGS} -Ilslboost \
1212
-DBOOST_ALL_NO_LIB \
13+
-DLOGURU_DEBUG_LOGGING=0 \
1314
-DLSL_LIBRARY_INFO_STR=\"${LSLGITREVISION:-"built from standalone build script"}\" \
1415
src/*.cpp src/pugixml/pugixml.cpp src/loguru/loguru.cpp \
1516
lslboost/libs/chrono/src/chrono.cpp \

0 commit comments

Comments
 (0)