mirror of
https://github.com/KjellKod/g3log.git
synced 2024-12-13 10:42:56 +01:00
87a095e384
--HG-- rename : g2log/Build.cmake => Build.cmake rename : g2log/CMakeLists.txt => CMakeLists.txt rename : g2log/CPackLists.txt => CPackLists.txt rename : g2log/Dynamic.cmake => Dynamic.cmake rename : g2log/example/Example.cmake => example/Example.cmake rename : g2log/example/main_contract.cpp => example/main_contract.cpp rename : g2log/example/main_sigsegv.cpp => example/main_sigsegv.cpp rename : g2log/src/active.hpp => src/active.hpp rename : g2log/src/crashhandler.hpp => src/crashhandler.hpp rename : g2log/src/crashhandler_unix.cpp => src/crashhandler_unix.cpp rename : g2log/src/crashhandler_win.cpp => src/crashhandler_win.cpp rename : g2log/src/g2filesink.cpp => src/g2filesink.cpp rename : g2log/src/g2filesink.hpp => src/g2filesink.hpp rename : g2log/src/g2filesinkhelper.ipp => src/g2filesinkhelper.ipp rename : g2log/src/g2future.hpp => src/g2future.hpp rename : g2log/src/g2log.cpp => src/g2log.cpp rename : g2log/src/g2log.hpp => src/g2log.hpp rename : g2log/src/g2loglevels.cpp => src/g2loglevels.cpp rename : g2log/src/g2loglevels.hpp => src/g2loglevels.hpp rename : g2log/src/g2logmessage.cpp => src/g2logmessage.cpp rename : g2log/src/g2logmessage.hpp => src/g2logmessage.hpp rename : g2log/src/g2logmessagecapture.cpp => src/g2logmessagecapture.cpp rename : g2log/src/g2logmessagecapture.hpp => src/g2logmessagecapture.hpp rename : g2log/src/g2logworker.cpp => src/g2logworker.cpp rename : g2log/src/g2logworker.hpp => src/g2logworker.hpp rename : g2log/src/g2moveoncopy.hpp => src/g2moveoncopy.hpp rename : g2log/src/g2sink.hpp => src/g2sink.hpp rename : g2log/src/g2sinkhandle.hpp => src/g2sinkhandle.hpp rename : g2log/src/g2sinkwrapper.hpp => src/g2sinkwrapper.hpp rename : g2log/src/g2time.cpp => src/g2time.cpp rename : g2log/src/g2time.hpp => src/g2time.hpp rename : g2log/src/shared_queue.hpp => src/shared_queue.hpp rename : g2log/src/std2_make_unique.hpp => src/std2_make_unique.hpp rename : g2log/src/stlpatch_future.hpp => src/stlpatch_future.hpp rename : g2log/test_performance/Performance.cmake => test_performance/Performance.cmake rename : g2log/test_performance/main_threaded_mean.cpp => test_performance/main_threaded_mean.cpp rename : g2log/test_performance/main_threaded_worst.cpp => test_performance/main_threaded_worst.cpp rename : g2log/test_performance/performance.h => test_performance/performance.h rename : g2log/test_unit/Test.cmake => test_unit/Test.cmake rename : g2log/test_unit/test_concept_sink.cpp => test_unit/test_concept_sink.cpp rename : g2log/test_unit/test_configuration.cpp => test_unit/test_configuration.cpp rename : g2log/test_unit/test_filechange.cpp => test_unit/test_filechange.cpp rename : g2log/test_unit/test_io.cpp => test_unit/test_io.cpp rename : g2log/test_unit/test_linux_dynamic_loaded_sharedlib.cpp => test_unit/test_linux_dynamic_loaded_sharedlib.cpp rename : g2log/test_unit/test_sink.cpp => test_unit/test_sink.cpp rename : g2log/test_unit/tester_sharedlib.cpp => test_unit/tester_sharedlib.cpp rename : g2log/test_unit/tester_sharedlib.h => test_unit/tester_sharedlib.h rename : g2log/test_unit/testing_helpers.cpp => test_unit/testing_helpers.cpp rename : g2log/test_unit/testing_helpers.h => test_unit/testing_helpers.h
27 lines
1.1 KiB
CMake
27 lines
1.1 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)
|
|
target_link_libraries(g3log-FATAL-contract ${G3LOG_LIBRARY} ${PLATFORM_LINK_LIBRIES})
|
|
target_link_libraries(g3log-FATAL-sigsegv ${G3LOG_LIBRARY} ${PLATFORM_LINK_LIBRIES})
|
|
ELSE()
|
|
MESSAGE("-DUSE_SIMPLE_EXAMPLE=OFF")
|
|
ENDIF (USE_SIMPLE_EXAMPLE) |