changeset 170:4b62e4a92828

Added configurable trace level for extensions
author Sebastien Decugis <sdecugis@nict.go.jp>
date Tue, 02 Feb 2010 10:54:35 +0900
parents f8507f57a3c0
children 8ccbfdb49f1c
files extensions/_sample/CMakeLists.txt extensions/acl_wl/CMakeLists.txt extensions/rt_default/CMakeLists.txt
diffstat 3 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/extensions/_sample/CMakeLists.txt	Tue Feb 02 10:24:32 2010 +0900
+++ b/extensions/_sample/CMakeLists.txt	Tue Feb 02 10:54:35 2010 +0900
@@ -1,5 +1,11 @@
 # The sample extension
 PROJECT("Sample extension" C)
 
+# Overwrite the debug level for the extension code if configured
+OPTION(DEBUG_LEVEL__SAMPLE "Overwrite debug level for the extension _sample if defined" OFF)
+IF (DEBUG_LEVEL__SAMPLE)
+     ADD_DEFINITIONS(-DTRACE_LEVEL=${DEBUG_LEVEL__SAMPLE})
+ENDIF (DEBUG_LEVEL__SAMPLE)
+
 # Compile as a module
 FD_ADD_EXTENSION(dbg_sample sample.c fini.c)
--- a/extensions/acl_wl/CMakeLists.txt	Tue Feb 02 10:24:32 2010 +0900
+++ b/extensions/acl_wl/CMakeLists.txt	Tue Feb 02 10:54:35 2010 +0900
@@ -16,5 +16,11 @@
 	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" OFF)
+IF (DEBUG_LEVEL_ACL_WL)
+     ADD_DEFINITIONS(-DTRACE_LEVEL=${DEBUG_LEVEL_ACL_WL})
+ENDIF (DEBUG_LEVEL_ACL_WL)
+
 # Compile as a module
 FD_ADD_EXTENSION(acl_wl ${ACL_WL_SRC})
--- a/extensions/rt_default/CMakeLists.txt	Tue Feb 02 10:24:32 2010 +0900
+++ b/extensions/rt_default/CMakeLists.txt	Tue Feb 02 10:54:35 2010 +0900
@@ -30,5 +30,11 @@
 
 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" OFF)
+IF (DEBUG_LEVEL_RT_DEFAULT)
+     ADD_DEFINITIONS(-DTRACE_LEVEL=${DEBUG_LEVEL_RT_DEFAULT})
+ENDIF (DEBUG_LEVEL_RT_DEFAULT)
+
 # Compile these files as a freeDiameter extension
 FD_ADD_EXTENSION(rt_default ${RT_DEFAULT_SRC})
"Welcome to our mercurial repository"