diff options
author | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2020-04-28 14:26:24 +0000 |
---|---|---|
committer | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2020-04-28 14:26:24 +0000 |
commit | 8acbb4609c8f5c0cbc09c6c56aad9f591dddce63 (patch) | |
tree | 4633d6905fa263bfddf2b62318014d8ec4984b2e | |
parent | 1b1412d4b0046f95bfefc89289c53c5489172596 (diff) | |
download | pcre2-8acbb4609c8f5c0cbc09c6c56aad9f591dddce63.tar.gz |
Patch CMakeLists.txt to properly test for mkostemp.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1250 6239d852-aaf2-0410-a92c-79f79f948069
-rw-r--r-- | CMakeLists.txt | 14 | ||||
-rw-r--r-- | ChangeLog | 3 |
2 files changed, 15 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 58af430..8768bdf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,8 +88,9 @@ # 2020-03-24 PH changed CMAKE_MODULE_PATH definition to add, not replace # 2020-04-08 Carlo added function check for secure_getenv, fixed strerror # 2020-04-16 enh added check for __attribute__((uninitialized)) -# 2020=04-25 PH applied patches from Uwe Korn to support pkg-config and +# 2020-04-25 PH applied patches from Uwe Korn to support pkg-config and # library versioning. +# 2020-04-25 Carlo added function check for mkostemp used in ProtExecAllocator PROJECT(PCRE2 C) @@ -118,6 +119,7 @@ FIND_PACKAGE( Editline ) INCLUDE(CheckCSourceCompiles) INCLUDE(CheckFunctionExists) +INCLUDE(CheckSymbolExists) INCLUDE(CheckIncludeFile) INCLUDE(CheckTypeSize) @@ -323,7 +325,15 @@ IF(PCRE2_SUPPORT_JIT) ENDIF(PCRE2_SUPPORT_JIT) IF(PCRE2_SUPPORT_JIT_SEALLOC) - SET(SLJIT_PROT_EXECUTABLE_ALLOCATOR 1) + SET(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE) + CHECK_SYMBOL_EXISTS(mkostemp stdlib.h REQUIRED) + UNSET(CMAKE_REQUIRED_DEFINITIONS) + IF(${REQUIRED}) + ADD_DEFINITIONS(-D_GNU_SOURCE) + SET(SLJIT_PROT_EXECUTABLE_ALLOCATOR 1) + ELSE(${REQUIRED}) + SET(PCRE2_SUPPORT_JIT_SEALLOC OFF) + ENDIF(${REQUIRED}) ENDIF(PCRE2_SUPPORT_JIT_SEALLOC) IF(PCRE2GREP_SUPPORT_JIT) @@ -114,6 +114,9 @@ variables. pcre2-config, the libpcre*.pc files, SOVERSION, VERSION and the MACHO_*_VERSIONS settings for CMake builds. +28. Another patch to CMakeLists.txt to check for mkostemp (configure already +does). Patch by Carlo Marcelo Arenas Belon. + Version 10.34 21-November-2019 ------------------------------ |