浏览代码

Merge pull request #952 from gjasny/optional-debug

CMake: Add option to disable Debug tools
bel2125 4 年之前
父节点
当前提交
7634665f64
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      CMakeLists.txt

+ 4 - 1
CMakeLists.txt

@@ -476,8 +476,11 @@ endif()
 
 
 
 
 # Set up the definitions
 # Set up the definitions
+option(CIVETWEB_ENABLE_DEBUG_TOOLS "For Debug builds enable verbose logging and assertions" ON)
 if (${CMAKE_BUILD_TYPE} MATCHES "[Dd]ebug")
 if (${CMAKE_BUILD_TYPE} MATCHES "[Dd]ebug")
-  add_definitions(-DDEBUG)
+  if(CIVETWEB_ENABLE_DEBUG_TOOLS)
+    add_definitions(-DDEBUG)
+  endif()
   add_definitions(-O0)
   add_definitions(-O0)
   add_definitions(-g)
   add_definitions(-g)
 endif()
 endif()