[Greater-commits] r204 - trunk/GREAT-ER-DB/trunk/impl/postgresql

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Jun 15 11:39:28 CEST 2011


Author: aheinecke
Date: 2011-06-15 11:39:28 +0200 (Wed, 15 Jun 2011)
New Revision: 204

Modified:
   trunk/GREAT-ER-DB/trunk/impl/postgresql/CMakeLists.txt
   trunk/GREAT-ER-DB/trunk/impl/postgresql/dagreater_pg.h
Log:
Add option to control debug output


Modified: trunk/GREAT-ER-DB/trunk/impl/postgresql/CMakeLists.txt
===================================================================
--- trunk/GREAT-ER-DB/trunk/impl/postgresql/CMakeLists.txt	2011-06-15 09:20:09 UTC (rev 203)
+++ trunk/GREAT-ER-DB/trunk/impl/postgresql/CMakeLists.txt	2011-06-15 09:39:28 UTC (rev 204)
@@ -33,7 +33,9 @@
 set(CMAKE_DAGREATER_PG_VERSION_PATCH 0)
 set(CMAKE_DAGREATER_PG_VERSION_STRING  "${CMAKE_DAGREATER_PG_VERSION_MAJOR}.${CMAKE_DAGREATER_PG_VERSION_MINOR}.${CMAKE_DAGREATER_PG_VERSION_PATCH}")
 
-option(DAGERATER_ENABLE_TESTS "Enable tests")
+option(DAGERATER_ENABLE_TESTS "Enable tests" OFF)
+option(DAGREATER_DEBUG "Add debug output" OFF)
+
 if (DAGREATER_ENABLE_TESTS)
     message(STATUS "Testing is not yet implemented from cmake")
     add_subdirectory(tests)
@@ -51,6 +53,10 @@
    add_definitions(/we4700)
 endif()
 
+if (DAGREATER_DEBUG)
+   add_definitions(-DDEBUG_MODE_ON=1)
+endif()
+
 include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${POSTGRESQL_INCLUDE_DIR})
 set(dagreater_pg_SRCS
    dagreater_pg.c

Modified: trunk/GREAT-ER-DB/trunk/impl/postgresql/dagreater_pg.h
===================================================================
--- trunk/GREAT-ER-DB/trunk/impl/postgresql/dagreater_pg.h	2011-06-15 09:20:09 UTC (rev 203)
+++ trunk/GREAT-ER-DB/trunk/impl/postgresql/dagreater_pg.h	2011-06-15 09:39:28 UTC (rev 204)
@@ -74,8 +74,9 @@
 /*! \def DEBUG_MODE_ON 
  *  defines a flag for DEBUG-Mode (0 or 1).
  */
-#define DEBUG_MODE_ON                 0     /* disable/enable DEBUG output
-                                             * ---------------------------
+#ifndef DEBUG_MODE_ON
+#define DEBUG_MODE_ON                 0     
+#endif                                       /* disable/enable DEBUG output
                                              * switch on/off debug functions
                                              * by compilation of the API DLL
                                              * DEBUG_MODE_ON=1 -> enable  DEBUG output



More information about the Greater-commits mailing list