summaryrefslogtreecommitdiffstats
path: root/src/civetweb/cmake/check/patch.cmake
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/civetweb/cmake/check/patch.cmake
parentInitial commit. (diff)
downloadceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz
ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/civetweb/cmake/check/patch.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/civetweb/cmake/check/patch.cmake b/src/civetweb/cmake/check/patch.cmake
new file mode 100644
index 000000000..472d392b5
--- /dev/null
+++ b/src/civetweb/cmake/check/patch.cmake
@@ -0,0 +1,12 @@
+message(STATUS "Patching check ${VERSION} ${SOURCE_DIR}")
+
+# Patch checks for MinGW
+# https://sourceforge.net/p/check/patches/53/
+set(CMAKE_LISTS_LOCATION "${SOURCE_DIR}/CMakeLists.txt")
+file(READ ${CMAKE_LISTS_LOCATION} CMAKE_LISTS)
+string(REGEX REPLACE
+ "(check_type_size\\((clock|clockid|timer)_t [A-Z_]+\\)[\r\n]+[^\r\n]+[\r\n]+[^\r\n]+[\r\n]+endif\\(NOT HAVE[A-Z_]+\\))"
+ "set(CMAKE_EXTRA_INCLUDE_FILES time.h)\n\\1\nunset(CMAKE_EXTRA_INCLUDE_FILES)"
+ CMAKE_LISTS "${CMAKE_LISTS}")
+file(WRITE ${CMAKE_LISTS_LOCATION} "${CMAKE_LISTS}")
+message(STATUS "Patched ${CMAKE_LISTS_LOCATION}")