mirror of
https://github.com/KjellKod/g3log.git
synced 2024-12-12 10:23:50 +01:00
fdd3c2572a
Next step is to add the windows g3logger fatal exit handler (POC finished)
30 lines
1.3 KiB
CMake
30 lines
1.3 KiB
CMake
# ==============================================================
|
|
# -DUSE_SIMPLE_EXAMPLE=OFF : to turn off the fatal examples
|
|
#
|
|
#
|
|
# Leaving it to ON will create
|
|
# g3log-FATAL-sigsegv
|
|
# g3log-FATAL-contract
|
|
#
|
|
# ==============================================================
|
|
|
|
|
|
set(DIR_EXAMPLE ${g3log_SOURCE_DIR}/example)
|
|
option (USE_SIMPLE_EXAMPLE "Simple (fatal-crash/contract) examples " ON)
|
|
|
|
|
|
IF (USE_SIMPLE_EXAMPLE)
|
|
|
|
MESSAGE("-DUSE_SIMPLE_EXAMPLE=ON")
|
|
MESSAGE("\tg3log-FATAL-contract and g3log-FATAL-sigsegv shows fatal examples of when g3log comes in handy")
|
|
include_directories (${DIR_EXAMPLE})
|
|
add_executable(g3log-FATAL-contract ${DIR_EXAMPLE}/main_contract.cpp)
|
|
add_executable(g3log-FATAL-sigsegv ${DIR_EXAMPLE}/main_sigsegv.cpp)
|
|
add_executable(g3log-FATAL-choice ${DIR_EXAMPLE}/main_fatal_choice.cpp)
|
|
|
|
target_link_libraries(g3log-FATAL-contract ${G3LOG_LIBRARY} ${PLATFORM_LINK_LIBRIES})
|
|
target_link_libraries(g3log-FATAL-sigsegv ${G3LOG_LIBRARY} ${PLATFORM_LINK_LIBRIES})
|
|
target_link_libraries(g3log-FATAL-choice ${G3LOG_LIBRARY} ${PLATFORM_LINK_LIBRIES})
|
|
ELSE()
|
|
MESSAGE("-DUSE_SIMPLE_EXAMPLE=OFF")
|
|
ENDIF (USE_SIMPLE_EXAMPLE) |