aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2020-12-18 21:07:41 +0100
committerGitHub <noreply@github.com>2020-12-18 12:07:41 -0800
commit66bac12e4e54cc858bdf7f93c5786010b6812b13 (patch)
treed6d09ec27d2fbd9f3113d23be46b74c3166c8a65
parentd64ecde3a60573c4f9e1a448f11c8f111abf274d (diff)
downloadvcpkg-66bac12e4e54cc858bdf7f93c5786010b6812b13.tar.gz
vcpkg-66bac12e4e54cc858bdf7f93c5786010b6812b13.zip
[civetweb] Disable extensive log output for debug builds (#15168)
-rw-r--r--ports/civetweb/CONTROL1
-rw-r--r--ports/civetweb/add-option-to-disable-debug-tools.patch36
-rw-r--r--ports/civetweb/portfile.cmake2
3 files changed, 39 insertions, 0 deletions
diff --git a/ports/civetweb/CONTROL b/ports/civetweb/CONTROL
index 4026126bc..395e24465 100644
--- a/ports/civetweb/CONTROL
+++ b/ports/civetweb/CONTROL
@@ -1,5 +1,6 @@
Source: civetweb
Version: 1.13
+Port-Version: 1
Homepage: https://github.com/civetweb/civetweb
Description: Easy to use, powerful, C/C++ embeddable web server.
Supports: !uwp
diff --git a/ports/civetweb/add-option-to-disable-debug-tools.patch b/ports/civetweb/add-option-to-disable-debug-tools.patch
new file mode 100644
index 000000000..5cf276886
--- /dev/null
+++ b/ports/civetweb/add-option-to-disable-debug-tools.patch
@@ -0,0 +1,36 @@
+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
+
diff --git a/ports/civetweb/portfile.cmake b/ports/civetweb/portfile.cmake
index 5e26a3171..2dae7f4d6 100644
--- a/ports/civetweb/portfile.cmake
+++ b/ports/civetweb/portfile.cmake
@@ -8,6 +8,7 @@ vcpkg_from_github(
REF 8e243456965c9be5212cb96519da69cd54550e3d # v1.13
SHA512 6f9daf404975697c6b7a56cc71006aaf14442acf545e483d8a7b845f255d5e5d6e08194fe3350a667e0b737b6924c9d39b025b587af27e7f12cd7b64f314eb70
HEAD_REF master
+ PATCHES "add-option-to-disable-debug-tools.patch"
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
@@ -19,6 +20,7 @@ vcpkg_configure_cmake(
PREFER_NINJA
OPTIONS
-DCIVETWEB_BUILD_TESTING=OFF
+ -DCIVETWEB_ENABLE_DEBUG_TOOLS=OFF
-DCIVETWEB_ENABLE_ASAN=OFF
-DCIVETWEB_ENABLE_CXX=ON
-DCIVETWEB_ENABLE_IPV6=ON