2015-02-02 08:31:43 +01:00
# -DUSE_DYNAMIC_LOGGING_LEVELS=ON : run-type turn on/off levels
option ( USE_DYNAMIC_LOGGING_LEVELS
" T u r n O N / O F F l o g l e v e l s . A n d i s a b l e d l e v e l w i l l n o t p u s h l o g s o f t h a t l e v e l t o t h e s i n k . B y d e f a u l t d y n a m i c l o g g i n g i s d i s a b l e d " O F F )
IF ( USE_DYNAMIC_LOGGING_LEVELS )
add_definitions ( -DG2_DYNAMIC_LOGGING )
2015-02-16 09:37:55 +01:00
MESSAGE ( "-DUSE_DYNAMIC_LOGGING_LEVELS=ON" )
MESSAGE ( "\tDynamic logging levels can be turned on. Make sure to have \n\t\t[#define G2_DYNAMIC_LOGGING 1] in your source code" )
2015-02-02 08:31:43 +01:00
MESSAGE ( "\t\tUse [g2::setLogLevel(LEVEL boolean)] to enable/disable logging on specified levels" )
ELSE ( )
MESSAGE ( "-DUSE_DYNAMIC_LOGGING_LEVELS=OFF" )
ENDIF ( USE_DYNAMIC_LOGGING_LEVELS )
# -DCHANGE_G3LOG_DEBUG_TO_DBUG=ON : change the DEBUG logging level to be DBUG to avoid clash with other libraries that might have
# predefined DEBUG for their own purposes
option ( CHANGE_G3LOG_DEBUG_TO_DBUG
" U s e D B U G l o g g i n g l e v e l i n s t e a d o f D E B U G . B y d e f a u l t D E B U G i s t h e d e b u g g i n g l e v e l " O F F )
IF ( CHANGE_G3LOG_DEBUG_TO_DBUG )
add_definitions ( -DCHANGE_G3LOG_DEBUG_TO_DBUG )
2015-02-16 09:37:55 +01:00
MESSAGE ( "-DCHANGE_G3LOG_DEBUG_TO_DBUG=ON" )
MESSAGE ( "\tDBUG instead of DEBUG logging level can be used. Make sure to have \n\t\t[#define CHANGE_G3LOG_DEBUG_TO_DBUG 1] in your source code" )
2015-02-02 08:31:43 +01:00
ELSE ( )
2015-02-16 09:37:55 +01:00
MESSAGE ( "-DCHANGE_G3LOG_DEBUG_TO_DBUG=OFF" )
MESSAGE ( "\tDebuggin logging level is 'DEBUG'" )
2015-02-02 08:31:43 +01:00
ENDIF ( CHANGE_G3LOG_DEBUG_TO_DBUG )
2015-02-16 09:37:55 +01:00
2015-02-18 12:06:22 +01:00
# -DENABLE_FATAL_SIGNALHANDLING=ON : defualt change the
# By default fatal signal handling is enabled. You can disable it with this option
# enumerated in src/stacktrace_windows.cpp
option ( ENABLE_FATAL_SIGNALHANDLING
" V e c t o r e d e x c e p t i o n / c r a s h h a n d l i n g w i t h i m p r o v e d s t a c k t r a c e " O N )
IF ( NOT ENABLE_FATAL_SIGNALHANDLING )
add_definitions ( -DDISABLE_FATAL_SIGNALHANDLING )
2015-06-17 13:26:36 +02:00
MESSAGE ( "-DENABLE_FATAL_SIGNALHANDLING=OFF\t\t\tFatal signal handler is disabled. Make sure to have \n\t\t[#define DISABLE_FATAL_SIGNALHANDLING 1] in your source code" )
2015-02-18 12:06:22 +01:00
ELSE ( )
2015-06-17 13:26:36 +02:00
MESSAGE ( "-DENABLE_FATAL_SIGNALHANDLING=ON\t\t\tFatal signal handler is enabled" )
2015-02-18 12:06:22 +01:00
ENDIF ( NOT ENABLE_FATAL_SIGNALHANDLING )
# WINDOWS OPTIONS
IF ( MSVC OR MINGW )
2015-02-16 09:37:55 +01:00
# -DENABLE_VECTORED_EXCEPTIONHANDLING=ON : defualt change the
# By default vectored exception handling is enabled, you can disable it with this option.
# Please know that only known fatal exceptions will be caught, these exceptions are the ones
# enumerated in src/stacktrace_windows.cpp
option ( ENABLE_VECTORED_EXCEPTIONHANDLING
" V e c t o r e d e x c e p t i o n / c r a s h h a n d l i n g w i t h i m p r o v e d s t a c k t r a c e " O N )
2015-02-18 12:06:22 +01:00
IF ( NOT ENABLE_VECTORED_EXCEPTIONHANDLING )
2015-02-16 09:37:55 +01:00
add_definitions ( -DDISABLE_VECTORED_EXCEPTIONHANDLING )
2015-06-09 18:43:32 +02:00
MESSAGE ( "-DENABLE_VECTORED_EXCEPTIONHANDLING=OFF\t\t\tVectored exception handling is disabled. Make sure to have \n\t\t[#define DISABLE_VECTORED_EXCEPTIONHANDLING 1] in your source code" )
2015-02-16 09:37:55 +01:00
ELSE ( )
2015-02-18 12:06:22 +01:00
MESSAGE ( "-DENABLE_VECTORED_EXCEPTIONHANDLING=ON\t\t\tVectored exception handling is enabled" )
2015-02-16 09:37:55 +01:00
ENDIF ( NOT ENABLE_VECTORED_EXCEPTIONHANDLING )
2015-02-18 12:06:22 +01:00
# Default ON. Will trigger a break point in DEBUG builds if the signal handler
# receives a fatal signal.
#
option ( DEBUG_BREAK_AT_FATAL_SIGNAL
" E n a b l e V i s u a l S t u d i o b r e a k p o i n t w h e n r e c e i v i n g a f a t a l e x c e p t i o n . I n _ _ D E B U G m o d e o n l y " O N )
IF ( DEBUG_BREAK_AT_FATAL_SIGNAL )
add_definitions ( -DDEBUG_BREAK_AT_FATAL_SIGNAL )
2015-06-09 18:43:32 +02:00
MESSAGE ( "-DDEBUG_BREAK_AT_FATAL_SIGNAL=ON\t\t\tBreak point for fatal signal is enabled for __DEBUG.Make sure to have \n\t\t[#define DEBUG_BREAK_AT_FATAL_SIGNAL 1] in your source code" )
2015-02-18 12:06:22 +01:00
ELSE ( )
MESSAGE ( "-DDEBUG_BREAK_AT_FATAL_SIGNAL=OFF\t\t\tBreak point for fatal signal is disabled" )
ENDIF ( DEBUG_BREAK_AT_FATAL_SIGNAL )
ENDIF ( MSVC OR MINGW )