# HG changeset patch # User Thomas Klausner # Date 1362045991 -3600 # Node ID b415d1384e0deb24b3feee7ad943f8c824fd6e3c # Parent d028fa6625e00eaf6386e1ebfca44fcd52cb5173 Remove TRACE_LEVEL. Obsoleted by run-time support (--debug-one-file). Ok sdecugis. diff -r d028fa6625e0 -r b415d1384e0d extensions/_sample/CMakeLists.txt --- a/extensions/_sample/CMakeLists.txt Wed Feb 27 17:25:46 2013 +0100 +++ b/extensions/_sample/CMakeLists.txt Thu Feb 28 11:06:31 2013 +0100 @@ -1,15 +1,6 @@ # The sample extension PROJECT("Sample extension") -# Overwrite the debug level for the extension code if configured -OPTION(DEBUG_LEVEL__SAMPLE "Overwrite debug level for the extension _sample if defined (valid values: FULL, ANNOYING, CALL...)" OFF) -IF (DEBUG_LEVEL__SAMPLE) - ADD_DEFINITIONS(-DTRACE_LEVEL=${DEBUG_LEVEL__SAMPLE}) -ENDIF (DEBUG_LEVEL__SAMPLE) -IF (NOT CMAKE_BUILD_TYPE MATCHES "Debug") - MARK_AS_ADVANCED(DEBUG_LEVEL__SAMPLE) -ENDIF (NOT CMAKE_BUILD_TYPE MATCHES "Debug") - # Compile as a module FD_ADD_EXTENSION(dbg_sample sample.c hello.cpp fini.c) diff -r d028fa6625e0 -r b415d1384e0d extensions/acl_wl/CMakeLists.txt --- a/extensions/acl_wl/CMakeLists.txt Wed Feb 27 17:25:46 2013 +0100 +++ b/extensions/acl_wl/CMakeLists.txt Thu Feb 28 11:06:31 2013 +0100 @@ -16,15 +16,6 @@ aw_conf.tab.h ) -# Overwrite the debug level for the extension code if configured -OPTION(DEBUG_LEVEL_ACL_WL "Overwrite debug level for the extension acl_wl if defined (valid values: FULL, ANNOYING, CALL...)" OFF) -IF (DEBUG_LEVEL_ACL_WL) - ADD_DEFINITIONS(-DTRACE_LEVEL=${DEBUG_LEVEL_ACL_WL}) -ENDIF (DEBUG_LEVEL_ACL_WL) -IF (NOT CMAKE_BUILD_TYPE MATCHES "Debug") - MARK_AS_ADVANCED(DEBUG_LEVEL_ACL_WL) -ENDIF (NOT CMAKE_BUILD_TYPE MATCHES "Debug") - # Compile as a module FD_ADD_EXTENSION(acl_wl ${ACL_WL_SRC}) diff -r d028fa6625e0 -r b415d1384e0d extensions/app_radgw/CMakeLists.txt --- a/extensions/app_radgw/CMakeLists.txt Wed Feb 27 17:25:46 2013 +0100 +++ b/extensions/app_radgw/CMakeLists.txt Thu Feb 28 11:06:31 2013 +0100 @@ -2,16 +2,6 @@ PROJECT("RADIUS/Diameter extensible gateway application for freeDiameter" C) -# Overwrite the debug level for the extension code if configured -OPTION(DEBUG_LEVEL_APP_RADGW "Overwrite debug level for the extension app_radgw if defined (valid values: FULL, ANNOYING, CALL...)" OFF) -IF (DEBUG_LEVEL_APP_RADGW) - ADD_DEFINITIONS(-DTRACE_LEVEL=${DEBUG_LEVEL_APP_RADGW}) -ENDIF (DEBUG_LEVEL_APP_RADGW) -IF (NOT CMAKE_BUILD_TYPE MATCHES "Debug") - MARK_AS_ADVANCED(DEBUG_LEVEL_APP_RADGW) -ENDIF (NOT CMAKE_BUILD_TYPE MATCHES "Debug") - - ########### Main app_radgw extension ############# # Parser files diff -r d028fa6625e0 -r b415d1384e0d extensions/rt_default/CMakeLists.txt --- a/extensions/rt_default/CMakeLists.txt Wed Feb 27 17:25:46 2013 +0100 +++ b/extensions/rt_default/CMakeLists.txt Thu Feb 28 11:06:31 2013 +0100 @@ -30,15 +30,6 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) -# Overwrite the debug level for the extension code if configured, example: cmake -DDEBUG_LEVEL_RT_DEFAULT:STATIC=CALL ... -OPTION(DEBUG_LEVEL_RT_DEFAULT "Overwrite debug level for the extension rt_default if defined (valid values: FULL, ANNOYING, CALL...)" OFF) -IF (DEBUG_LEVEL_RT_DEFAULT) - ADD_DEFINITIONS(-DTRACE_LEVEL=${DEBUG_LEVEL_RT_DEFAULT}) -ENDIF (DEBUG_LEVEL_RT_DEFAULT) -IF (NOT CMAKE_BUILD_TYPE MATCHES "Debug") - MARK_AS_ADVANCED(DEBUG_LEVEL_RT_DEFAULT) -ENDIF (NOT CMAKE_BUILD_TYPE MATCHES "Debug") - # Compile these files as a freeDiameter extension FD_ADD_EXTENSION(rt_default ${RT_DEFAULT_SRC}) diff -r d028fa6625e0 -r b415d1384e0d include/freeDiameter/libfdproto.h --- a/include/freeDiameter/libfdproto.h Wed Feb 27 17:25:46 2013 +0100 +++ b/include/freeDiameter/libfdproto.h Thu Feb 28 11:06:31 2013 +0100 @@ -221,14 +221,6 @@ #define FCTS 6 /* Display entry parameters of most functions */ #define CALL 9 /* Display calls to most functions (with CHECK macros) */ -/* Increment the debug level for a file at compilation time by defining -DTRACE_LEVEL=FULL for example. */ -#ifndef TRACE_LEVEL -#define TRACE_LEVEL NONE -#endif /* TRACE_LEVEL */ - -/* The level of the file being compiled. */ -static int local_debug_level = TRACE_LEVEL; - /* A global level, changed by configuration or cmd line for example. Default is INFO (in libfdproto/log.c). */ extern int fd_g_debug_lvl; @@ -251,11 +243,11 @@ /* Boolean for tracing at a certain level */ #ifdef DEBUG -#define TRACE_BOOL(_level_) ( ((_level_) <= local_debug_level + fd_g_debug_lvl) \ +#define TRACE_BOOL(_level_) ( ((_level_) <= fd_g_debug_lvl) \ || (fd_debug_one_function && !strcmp(fd_debug_one_function, __PRETTY_FUNCTION__)) \ || (fd_debug_one_file && !strcmp(fd_debug_one_file, __STRIPPED_FILE__) ) ) #else /* DEBUG */ -#define TRACE_BOOL(_level_) ((_level_) <= local_debug_level + fd_g_debug_lvl) +#define TRACE_BOOL(_level_) ((_level_) <= fd_g_debug_lvl) #endif /* DEBUG */ diff -r d028fa6625e0 -r b415d1384e0d tests/CMakeLists.txt --- a/tests/CMakeLists.txt Wed Feb 27 17:25:46 2013 +0100 +++ b/tests/CMakeLists.txt Thu Feb 28 11:06:31 2013 +0100 @@ -35,7 +35,6 @@ # Some parameters for the tests ADD_DEFINITIONS(-DTEST_DEBUG) -ADD_DEFINITIONS(-DTRACE_LEVEL=NONE) ADD_DEFINITIONS(-DBUILD_DIR="${CMAKE_BINARY_DIR}") INCLUDE_DIRECTORIES( "../libfdproto" )