diff options
author | Tom Rondeau <trondeau@vt.edu> | 2012-06-07 09:36:26 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2012-06-07 12:44:52 -0400 |
commit | 7cfe8af854348924d31aa1feb5978da6dd1fe1c4 (patch) | |
tree | 97191856f13febd0b31df5fa8808018537ce854b /gnuradio-core/src/lib/swig | |
parent | b40ccb1d3f12a6837df235ccbceee5180c711efa (diff) |
core: Adds a gr-log concept for easy logging at various levels.
Uses log4cxx and is optional. Macro based and macros are simple pass-throughs
if this dependency does not exist or if the gr-log is disabled.
Diffstat (limited to 'gnuradio-core/src/lib/swig')
-rw-r--r-- | gnuradio-core/src/lib/swig/CMakeLists.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gnuradio-core/src/lib/swig/CMakeLists.txt b/gnuradio-core/src/lib/swig/CMakeLists.txt index d3c381b4bc..3bef440f66 100644 --- a/gnuradio-core/src/lib/swig/CMakeLists.txt +++ b/gnuradio-core/src/lib/swig/CMakeLists.txt @@ -33,6 +33,16 @@ set(GR_SWIG_INCLUDE_DIRS ) set(GR_SWIG_LIBRARIES gnuradio-core) +# Only use if log4cxx is installed +# Define DISABLE_GR_LOG for the .i file to ignore it. +if(LOG4CXX_FOUND) + link_directories(${LOG4CXX_LIBRARY_DIRS}) + list(APPEND GR_SWIG_LIBRARIES log4cxx) + list(APPEND GR_SWIG_INCLUDE_DIRS ${LOG4CXX_INCLUDE_DIRS}) +else(LOG4CXX_FOUND) + add_definitions(-DDISABLE_GR_LOG) +endif(LOG4CXX_FOUND) + ######################################################################## # Build and install the swig targets ######################################################################## @@ -46,6 +56,7 @@ set(GR_SWIG_LIBRARIES gnuradio-core) set(GR_SWIG_TARGET_DEPS gengen_generated filter_generated) foreach(what runtime general gengen filter io hier) + SET(GR_SWIG_FLAGS "-DDISABLE_GR_LOG") SET(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/${what}_swig_doc.i) SET(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../${what} ${CMAKE_CURRENT_BINARY_DIR}/../${what}) GR_SWIG_MAKE(gnuradio_core_${what} gnuradio_core_${what}.i) |