Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Commit

Permalink
Check if LOGURU_STACKTRACES is allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
bstaletic authored and jacobdufault committed Aug 20, 2018
1 parent a3ace49 commit 32005b7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,14 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
endif()

### Definitions
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/foo.cpp
"#include <cxxabi.h>\n#include <dlfcn.h>\n#include <execinfo.h>\nint main(){}")
try_compile(LOGURU_STACKTRACES_ALLOWED ${CMAKE_CURRENT_BINARY_DIR}
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/foo.cpp)
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/foo.cpp)

target_compile_definitions(cquery PRIVATE
LOGURU_STACKTRACES=$<BOOL:${LOGURU_STACKTRACES_ALLOWED}>
LOGURU_WITH_STREAMS=1
LOGURU_FILENAME_WIDTH=18
LOGURU_THREADNAME_WIDTH=13
Expand Down

0 comments on commit 32005b7

Please sign in to comment.