[Pcre-svn] [1263] code/trunk: Change CMakeLists.txt to use …

Kezdőlap
Üzenet törlése
Szerző: Subversion repository
Dátum:  
Címzett: pcre-svn
Tárgy: [Pcre-svn] [1263] code/trunk: Change CMakeLists.txt to use CHECK_SYMBOL_EXISTS instead of
Revision: 1263
          http://www.exim.org/viewvc/pcre2?view=rev&revision=1263
Author:   ph10
Date:     2020-06-05 17:06:05 +0100 (Fri, 05 Jun 2020)
Log Message:
-----------
Change CMakeLists.txt to use CHECK_SYMBOL_EXISTS instead of 
CHECK_FUNCTION_EXISTS.


Modified Paths:
--------------
    code/trunk/CMakeLists.txt
    code/trunk/ChangeLog


Modified: code/trunk/CMakeLists.txt
===================================================================
--- code/trunk/CMakeLists.txt    2020-06-05 15:58:28 UTC (rev 1262)
+++ code/trunk/CMakeLists.txt    2020-06-05 16:06:05 UTC (rev 1263)
@@ -134,11 +134,11 @@
 CHECK_INCLUDE_FILE(unistd.h     HAVE_UNISTD_H)
 CHECK_INCLUDE_FILE(windows.h    HAVE_WINDOWS_H)


-CHECK_FUNCTION_EXISTS(bcopy         HAVE_BCOPY)
-CHECK_FUNCTION_EXISTS(memfd_create  HAVE_MEMFD_CREATE)
-CHECK_FUNCTION_EXISTS(memmove       HAVE_MEMMOVE)
-CHECK_FUNCTION_EXISTS(secure_getenv HAVE_SECURE_GETENV)
-CHECK_FUNCTION_EXISTS(strerror      HAVE_STRERROR)
+CHECK_SYMBOL_EXISTS(bcopy         "strings.h"  HAVE_BCOPY)
+CHECK_SYMBOL_EXISTS(memfd_create  "sys/mman.h" HAVE_MEMFD_CREATE)
+CHECK_SYMBOL_EXISTS(memmove       "string.h"   HAVE_MEMMOVE)
+CHECK_SYMBOL_EXISTS(secure_getenv "stdlib.h"   HAVE_SECURE_GETENV)
+CHECK_SYMBOL_EXISTS(strerror      "string.h"   HAVE_STRERROR)


set(ORIG_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror")

Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2020-06-05 15:58:28 UTC (rev 1262)
+++ code/trunk/ChangeLog    2020-06-05 16:06:05 UTC (rev 1263)
@@ -31,6 +31,12 @@
     allow spaces in directory names.


- This fixes a cmake error, if the path of the pcre2 source contains a space.
+
+5. Updated CMakeLists.txt with a patch from B. Scott Michel: CMake's
+documentation suggests using CHECK_SYMBOL_EXISTS over CHECK_FUNCTION_EXIST.
+Moreover, these functions come from specific header files, which need to be
+specified (and, thankfully, are the same on both the Linux and WinXX
+platforms.)


Version 10.35 09-May-2020