2014-10-03 00:56:13 -06:00
|
|
|
# ==============================================================
|
|
|
|
# -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)
|
2015-02-02 00:31:43 -07:00
|
|
|
option (USE_FATAL_EXAMPLE "Fatal (fatal-crashes/contract) examples " ON)
|
2014-10-03 00:56:13 -06:00
|
|
|
|
|
|
|
|
2015-02-02 00:31:43 -07:00
|
|
|
IF (USE_FATAL_EXAMPLE)
|
2014-10-03 00:56:13 -06:00
|
|
|
|
2015-02-02 00:31:43 -07:00
|
|
|
MESSAGE("-DUSE_FATAL_EXAMPLE=ON")
|
|
|
|
MESSAGE("\tg3log-FATAL- [contract][sigsegv][choice] are examples of when g3log comes in handy")
|
2014-10-03 00:56:13 -06:00
|
|
|
include_directories (${DIR_EXAMPLE})
|
|
|
|
add_executable(g3log-FATAL-contract ${DIR_EXAMPLE}/main_contract.cpp)
|
|
|
|
add_executable(g3log-FATAL-sigsegv ${DIR_EXAMPLE}/main_sigsegv.cpp)
|
2014-12-12 08:44:17 -07:00
|
|
|
add_executable(g3log-FATAL-choice ${DIR_EXAMPLE}/main_fatal_choice.cpp)
|
|
|
|
|
2015-02-02 00:31:43 -07:00
|
|
|
target_link_libraries(g3log-FATAL-contract ${G3LOG_LIBRARY})
|
|
|
|
target_link_libraries(g3log-FATAL-sigsegv ${G3LOG_LIBRARY})
|
|
|
|
target_link_libraries(g3log-FATAL-choice ${G3LOG_LIBRARY})
|
2014-10-03 00:56:13 -06:00
|
|
|
ELSE()
|
|
|
|
MESSAGE("-DUSE_SIMPLE_EXAMPLE=OFF")
|
2015-02-02 00:31:43 -07:00
|
|
|
ENDIF (USE_FATAL_EXAMPLE)
|