mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 16:29:07 +08:00
37 lines
1.1 KiB
Diff
37 lines
1.1 KiB
Diff
From 111672d5437a3c7f02b66d730be5000dade58bff Mon Sep 17 00:00:00 2001
|
|
From: Gregor Jasny <gjasny@googlemail.com>
|
|
Date: Tue, 15 Dec 2020 14:38:37 +0100
|
|
Subject: [PATCH] CMake: Add option to disable Debug tools
|
|
Origin: https://github.com/civetweb/civetweb/pull/952
|
|
|
|
Sometimes one needs the CMake `Debug` build type
|
|
to select the Windows Debug runtime. But at the same
|
|
time the verbose logging output might be unwanted.
|
|
|
|
This PR adds the `CIVETWEB_ENABLE_DEBUG_TOOLS` option
|
|
to disable extensive logging and assertion.
|
|
---
|
|
CMakeLists.txt | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 368e5640..000f7972 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -476,8 +476,11 @@ endif()
|
|
|
|
|
|
# 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")
|
|
- add_definitions(-DDEBUG)
|
|
+ if(CIVETWEB_ENABLE_DEBUG_TOOLS)
|
|
+ add_definitions(-DDEBUG)
|
|
+ endif()
|
|
add_definitions(-O0)
|
|
add_definitions(-g)
|
|
endif()
|
|
--
|
|
2.29.2
|
|
|