| 1 |
ph10 |
137 |
# CMakeLists.txt |
| 2 |
|
|
# |
| 3 |
ph10 |
258 |
# |
| 4 |
ph10 |
137 |
# This file allows building PCRE with the CMake configuration and build |
| 5 |
|
|
# tool. Download CMake in source or binary form from http://www.cmake.org/ |
| 6 |
|
|
# |
| 7 |
|
|
# Original listfile by Christian Ehrlicher <Ch.Ehrlicher@gmx.de> |
| 8 |
|
|
# Refined and expanded by Daniel Richard G. <skunk@iSKUNK.ORG> |
| 9 |
ph10 |
258 |
# 2007-09-14 mod by Sheri so 7.4 supported configuration options can be entered |
| 10 |
|
|
# 2007-09-19 Adjusted by PH to retain previous default settings |
| 11 |
ph10 |
291 |
# 2007-12-26 (a) On UNIX, use names libpcre instead of just pcre |
| 12 |
|
|
# (b) Ensure pcretest and pcregrep link with the local library, |
| 13 |
|
|
# not a previously-installed one. |
| 14 |
|
|
# (c) Add PCRE_SUPPORT_LIBREADLINE, PCRE_SUPPORT_LIBZ, and |
| 15 |
|
|
# PCRE_SUPPORT_LIBBZ2. |
| 16 |
ph10 |
303 |
# 2008-01-20 Brought up to date to include several new features by Christian |
| 17 |
|
|
# Ehrlicher. |
| 18 |
ph10 |
405 |
# 2008-01-22 Sheri added options for backward compatibility of library names |
| 19 |
|
|
# when building with minGW: |
| 20 |
ph10 |
311 |
# if "ON", NON_STANDARD_LIB_PREFIX causes shared libraries to |
| 21 |
ph10 |
405 |
# be built without "lib" as prefix. (The libraries will be named |
| 22 |
|
|
# pcre.dll, pcreposix.dll and pcrecpp.dll). |
| 23 |
ph10 |
311 |
# if "ON", NON_STANDARD_LIB_SUFFIX causes shared libraries to |
| 24 |
|
|
# be built with suffix of "-0.dll". (The libraries will be named |
| 25 |
|
|
# libpcre-0.dll, libpcreposix-0.dll and libpcrecpp-0.dll - same names |
| 26 |
|
|
# built by default with Configure and Make. |
| 27 |
ph10 |
312 |
# 2008-01-23 PH removed the automatic build of pcredemo. |
| 28 |
ph10 |
344 |
# 2008-04-22 PH modified READLINE support so it finds NCURSES when needed. |
| 29 |
ph10 |
351 |
# 2008-07-03 PH updated for revised UCP property support (change of files) |
| 30 |
ph10 |
407 |
# 2009-03-23 PH applied Steven Van Ingelgem's patch to change the name |
| 31 |
ph10 |
405 |
# CMAKE_BINARY_DIR to PROJECT_BINARY_DIR so that it works when PCRE |
| 32 |
|
|
# is included within another project. |
| 33 |
ph10 |
407 |
# 2009-03-23 PH applied a modified version of Steven Van Ingelgem's patches to |
| 34 |
|
|
# add options to stop the building of pcregrep and the tests, and |
| 35 |
|
|
# to disable the final configuration report. |
| 36 |
ph10 |
413 |
# 2009-04-11 PH applied Christian Ehrlicher's patch to show compiler flags that |
| 37 |
|
|
# are set by specifying a release type. |
| 38 |
ph10 |
475 |
# 2010-01-02 PH added test for stdint.h |
| 39 |
ph10 |
650 |
# 2010-03-02 PH added test for inttypes.h |
| 40 |
|
|
# 2011-08-01 PH added PCREGREP_BUFSIZE |
| 41 |
ph10 |
667 |
# 2011-08-22 PH added PCRE_SUPPORT_JIT |
| 42 |
ph10 |
684 |
# 2011-09-06 PH modified WIN32 ADD_TEST line as suggested by Sergey Cherepanov |
| 43 |
ph10 |
685 |
# 2011-09-06 PH added PCRE_SUPPORT_PCREGREP_JIT |
| 44 |
ph10 |
719 |
# 2011-10-04 Sheri added support for including coff data in windows shared libraries |
| 45 |
|
|
# compiled with MINGW if pcre.rc and/or pcreposix.rc are placed in |
| 46 |
|
|
# the source dir by the user prior to building |
| 47 |
|
|
# 2011-10-04 Sheri changed various add_test's to use exes' location built instead |
| 48 |
|
|
# of DEBUG location only (likely only matters in MSVC) |
| 49 |
|
|
# 2011-10-04 Sheri added scripts to provide needed variables to RunTest and |
| 50 |
|
|
# RunGrepTest (used for UNIX and Msys) |
| 51 |
|
|
# 2011-10-04 Sheri added scripts to provide needed variables and to execute |
| 52 |
|
|
# RunTest.bat in Win32 (for effortless testing with "make test") |
| 53 |
|
|
# 2011-10-04 Sheri Increased minimum required cmake version |
| 54 |
ph10 |
853 |
# 2012-01-06 PH removed pcre_info.c and added pcre_string_utils.c |
| 55 |
zherczeg |
863 |
# 2012-01-10 Zoltan Herczeg added libpcre16 support |
| 56 |
zherczeg |
864 |
# 2012-01-13 Stephen Kelly added out of source build support |
| 57 |
ph10 |
886 |
# 2012-01-17 PH applied Stephen Kelly's patch to parse the version data out |
| 58 |
|
|
# of the configure.ac file |
| 59 |
ph10 |
939 |
# 2012-02-26 PH added support for libedit |
| 60 |
ph10 |
1028 |
# 2012-09-06 PH added support for PCRE_EBCDIC_NL25 |
| 61 |
chpe |
1055 |
# 2012-09-08 ChPe added PCRE32 support |
| 62 |
ph10 |
1162 |
# 2012-10-23 PH added support for VALGRIND and GCOV |
| 63 |
ph10 |
1234 |
# 2012-12-08 PH added patch from Daniel Richard G to quash some MSVC warnings |
| 64 |
ph10 |
137 |
|
| 65 |
|
|
PROJECT(PCRE C CXX) |
| 66 |
|
|
|
| 67 |
ph10 |
719 |
# Increased minimum to 2.8.0 to support newer add_test features |
| 68 |
ph10 |
137 |
|
| 69 |
ph10 |
719 |
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0) |
| 70 |
|
|
|
| 71 |
ph10 |
405 |
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # for FindReadline.cmake |
| 72 |
ph10 |
303 |
|
| 73 |
|
|
# external packages |
| 74 |
|
|
FIND_PACKAGE( BZip2 ) |
| 75 |
|
|
FIND_PACKAGE( ZLIB ) |
| 76 |
|
|
FIND_PACKAGE( Readline ) |
| 77 |
ph10 |
939 |
FIND_PACKAGE( Editline ) |
| 78 |
ph10 |
303 |
|
| 79 |
ph10 |
137 |
# Configuration checks |
| 80 |
|
|
|
| 81 |
|
|
INCLUDE(CheckIncludeFile) |
| 82 |
|
|
INCLUDE(CheckIncludeFileCXX) |
| 83 |
|
|
INCLUDE(CheckFunctionExists) |
| 84 |
|
|
INCLUDE(CheckTypeSize) |
| 85 |
|
|
|
| 86 |
ph10 |
318 |
CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H) |
| 87 |
ph10 |
475 |
CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H) |
| 88 |
ph10 |
495 |
CHECK_INCLUDE_FILE(inttypes.h HAVE_INTTYPES_H) |
| 89 |
ph10 |
318 |
CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H) |
| 90 |
|
|
CHECK_INCLUDE_FILE(sys/types.h HAVE_SYS_TYPES_H) |
| 91 |
|
|
CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H) |
| 92 |
|
|
CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H) |
| 93 |
ph10 |
137 |
|
| 94 |
ph10 |
318 |
CHECK_INCLUDE_FILE_CXX(type_traits.h HAVE_TYPE_TRAITS_H) |
| 95 |
|
|
CHECK_INCLUDE_FILE_CXX(bits/type_traits.h HAVE_BITS_TYPE_TRAITS_H) |
| 96 |
ph10 |
137 |
|
| 97 |
ph10 |
318 |
CHECK_FUNCTION_EXISTS(bcopy HAVE_BCOPY) |
| 98 |
|
|
CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE) |
| 99 |
|
|
CHECK_FUNCTION_EXISTS(strerror HAVE_STRERROR) |
| 100 |
|
|
CHECK_FUNCTION_EXISTS(strtoll HAVE_STRTOLL) |
| 101 |
|
|
CHECK_FUNCTION_EXISTS(strtoq HAVE_STRTOQ) |
| 102 |
ph10 |
303 |
CHECK_FUNCTION_EXISTS(_strtoi64 HAVE__STRTOI64) |
| 103 |
ph10 |
137 |
|
| 104 |
ph10 |
318 |
CHECK_TYPE_SIZE("long long" LONG_LONG) |
| 105 |
|
|
CHECK_TYPE_SIZE("unsigned long long" UNSIGNED_LONG_LONG) |
| 106 |
ph10 |
137 |
|
| 107 |
|
|
# User-configurable options |
| 108 |
|
|
# |
| 109 |
|
|
# (Note: CMakeSetup displays these in alphabetical order, regardless of |
| 110 |
|
|
# the order we use here) |
| 111 |
|
|
|
| 112 |
ph10 |
144 |
SET(BUILD_SHARED_LIBS OFF CACHE BOOL |
| 113 |
|
|
"Build shared libraries instead of static ones.") |
| 114 |
ph10 |
137 |
|
| 115 |
zherczeg |
863 |
OPTION(PCRE_BUILD_PCRE8 "Build 8 bit PCRE library" ON) |
| 116 |
|
|
|
| 117 |
|
|
OPTION(PCRE_BUILD_PCRE16 "Build 16 bit PCRE library" OFF) |
| 118 |
|
|
|
| 119 |
chpe |
1055 |
OPTION(PCRE_BUILD_PCRE32 "Build 32 bit PCRE library" OFF) |
| 120 |
|
|
|
| 121 |
ph10 |
137 |
OPTION(PCRE_BUILD_PCRECPP "Build the PCRE C++ library (pcrecpp)." ON) |
| 122 |
|
|
|
| 123 |
ph10 |
144 |
SET(PCRE_EBCDIC OFF CACHE BOOL |
| 124 |
ph10 |
1028 |
"Use EBCDIC coding instead of ASCII. (This is rarely used outside of mainframe systems.)") |
| 125 |
ph10 |
137 |
|
| 126 |
ph10 |
1028 |
SET(PCRE_EBCDIC_NL25 OFF CACHE BOOL |
| 127 |
|
|
"Use 0x25 as EBCDIC NL character instead of 0x15; implies EBCDIC.") |
| 128 |
|
|
|
| 129 |
ph10 |
137 |
SET(PCRE_LINK_SIZE "2" CACHE STRING |
| 130 |
|
|
"Internal link size (2, 3 or 4 allowed). See LINK_SIZE in config.h.in for details.") |
| 131 |
|
|
|
| 132 |
|
|
SET(PCRE_MATCH_LIMIT "10000000" CACHE STRING |
| 133 |
|
|
"Default limit on internal looping. See MATCH_LIMIT in config.h.in for details.") |
| 134 |
|
|
|
| 135 |
|
|
SET(PCRE_MATCH_LIMIT_RECURSION "MATCH_LIMIT" CACHE STRING |
| 136 |
|
|
"Default limit on internal recursion. See MATCH_LIMIT_RECURSION in config.h.in for details.") |
| 137 |
|
|
|
| 138 |
ph10 |
650 |
SET(PCREGREP_BUFSIZE "20480" CACHE STRING |
| 139 |
|
|
"Buffer size parameter for pcregrep. See PCREGREP_BUFSIZE in config.h.in for details.") |
| 140 |
|
|
|
| 141 |
ph10 |
137 |
SET(PCRE_NEWLINE "LF" CACHE STRING |
| 142 |
ph10 |
258 |
"What to recognize as a newline (one of CR, LF, CRLF, ANY, ANYCRLF).") |
| 143 |
ph10 |
137 |
|
| 144 |
ph10 |
199 |
SET(PCRE_NO_RECURSE OFF CACHE BOOL |
| 145 |
ph10 |
137 |
"If ON, then don't use stack recursion when matching. See NO_RECURSE in config.h.in for details.") |
| 146 |
|
|
|
| 147 |
|
|
SET(PCRE_POSIX_MALLOC_THRESHOLD "10" CACHE STRING |
| 148 |
|
|
"Threshold for malloc() usage. See POSIX_MALLOC_THRESHOLD in config.h.in for details.") |
| 149 |
|
|
|
| 150 |
ph10 |
667 |
SET(PCRE_SUPPORT_JIT OFF CACHE BOOL |
| 151 |
|
|
"Enable support for Just-in-time compiling.") |
| 152 |
ph10 |
691 |
|
| 153 |
ph10 |
685 |
SET(PCRE_SUPPORT_PCREGREP_JIT ON CACHE BOOL |
| 154 |
|
|
"Enable use of Just-in-time compiling in pcregrep.") |
| 155 |
ph10 |
691 |
|
| 156 |
zherczeg |
863 |
SET(PCRE_SUPPORT_UTF OFF CACHE BOOL |
| 157 |
chpe |
1055 |
"Enable support for Unicode Transformation Format (UTF-8/UTF-16/UTF-32) encoding.") |
| 158 |
zherczeg |
863 |
|
| 159 |
ph10 |
144 |
SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF CACHE BOOL |
| 160 |
ph10 |
865 |
"Enable support for Unicode properties (if set, UTF support will be enabled as well).") |
| 161 |
ph10 |
137 |
|
| 162 |
ph10 |
258 |
SET(PCRE_SUPPORT_BSR_ANYCRLF OFF CACHE BOOL |
| 163 |
|
|
"ON=Backslash-R matches only LF CR and CRLF, OFF=Backslash-R matches all Unicode Linebreaks") |
| 164 |
|
|
|
| 165 |
ph10 |
1162 |
SET(PCRE_SUPPORT_VALGRIND OFF CACHE BOOL |
| 166 |
|
|
"Enable Valgrind support.") |
| 167 |
ph10 |
1221 |
|
| 168 |
ph10 |
1162 |
SET(PCRE_SUPPORT_COVERAGE OFF CACHE BOOL |
| 169 |
ph10 |
1221 |
"Enable code coverage support using gcov.") |
| 170 |
ph10 |
1162 |
|
| 171 |
ph10 |
407 |
OPTION(PCRE_SHOW_REPORT "Show the final configuration report" ON) |
| 172 |
|
|
OPTION(PCRE_BUILD_PCREGREP "Build pcregrep" ON) |
| 173 |
|
|
OPTION(PCRE_BUILD_TESTS "Build the tests" ON) |
| 174 |
ph10 |
311 |
|
| 175 |
ph10 |
318 |
IF (MINGW) |
| 176 |
|
|
OPTION(NON_STANDARD_LIB_PREFIX |
| 177 |
|
|
"ON=Shared libraries built in mingw will be named pcre.dll, etc., instead of libpcre.dll, etc." |
| 178 |
|
|
OFF) |
| 179 |
ph10 |
311 |
|
| 180 |
ph10 |
318 |
OPTION(NON_STANDARD_LIB_SUFFIX |
| 181 |
|
|
"ON=Shared libraries built in mingw will be named libpcre-0.dll, etc., instead of libpcre.dll, etc." |
| 182 |
|
|
OFF) |
| 183 |
|
|
ENDIF(MINGW) |
| 184 |
|
|
|
| 185 |
ph10 |
303 |
# bzip2 lib |
| 186 |
|
|
IF(BZIP2_FOUND) |
| 187 |
|
|
OPTION (PCRE_SUPPORT_LIBBZ2 "Enable support for linking pcregrep with libbz2." ON) |
| 188 |
|
|
ENDIF(BZIP2_FOUND) |
| 189 |
|
|
IF(PCRE_SUPPORT_LIBBZ2) |
| 190 |
|
|
INCLUDE_DIRECTORIES(${BZIP2_INCLUDE_DIR}) |
| 191 |
|
|
ENDIF(PCRE_SUPPORT_LIBBZ2) |
| 192 |
ph10 |
292 |
|
| 193 |
ph10 |
303 |
# zlib |
| 194 |
|
|
IF(ZLIB_FOUND) |
| 195 |
|
|
OPTION (PCRE_SUPPORT_LIBZ "Enable support for linking pcregrep with libz." ON) |
| 196 |
|
|
ENDIF(ZLIB_FOUND) |
| 197 |
|
|
IF(PCRE_SUPPORT_LIBZ) |
| 198 |
|
|
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) |
| 199 |
|
|
ENDIF(PCRE_SUPPORT_LIBZ) |
| 200 |
ph10 |
292 |
|
| 201 |
ph10 |
939 |
# editline lib |
| 202 |
|
|
IF(EDITLINE_FOUND) |
| 203 |
|
|
OPTION (PCRE_SUPPORT_LIBEDIT "Enable support for linking pcretest with libedit." OFF) |
| 204 |
|
|
ENDIF(EDITLINE_FOUND) |
| 205 |
|
|
IF(PCRE_SUPPORT_LIBEDIT) |
| 206 |
|
|
INCLUDE_DIRECTORIES(${EDITLINE_INCLUDE_DIR}) |
| 207 |
|
|
ENDIF(PCRE_SUPPORT_LIBEDIT) |
| 208 |
|
|
|
| 209 |
ph10 |
303 |
# readline lib |
| 210 |
|
|
IF(READLINE_FOUND) |
| 211 |
|
|
OPTION (PCRE_SUPPORT_LIBREADLINE "Enable support for linking pcretest with libreadline." ON) |
| 212 |
|
|
ENDIF(READLINE_FOUND) |
| 213 |
|
|
IF(PCRE_SUPPORT_LIBREADLINE) |
| 214 |
|
|
INCLUDE_DIRECTORIES(${READLINE_INCLUDE_DIR}) |
| 215 |
|
|
ENDIF(PCRE_SUPPORT_LIBREADLINE) |
| 216 |
ph10 |
291 |
|
| 217 |
ph10 |
137 |
# Prepare build configuration |
| 218 |
|
|
|
| 219 |
|
|
SET(pcre_have_type_traits 0) |
| 220 |
|
|
SET(pcre_have_bits_type_traits 0) |
| 221 |
|
|
|
| 222 |
|
|
IF(HAVE_TYPE_TRAITS_H) |
| 223 |
ph10 |
318 |
SET(pcre_have_type_traits 1) |
| 224 |
ph10 |
137 |
ENDIF(HAVE_TYPE_TRAITS_H) |
| 225 |
|
|
|
| 226 |
|
|
IF(HAVE_BITS_TYPE_TRAITS_H) |
| 227 |
ph10 |
318 |
SET(pcre_have_bits_type_traits 1) |
| 228 |
ph10 |
137 |
ENDIF(HAVE_BITS_TYPE_TRAITS_H) |
| 229 |
|
|
|
| 230 |
|
|
SET(pcre_have_long_long 0) |
| 231 |
|
|
SET(pcre_have_ulong_long 0) |
| 232 |
|
|
|
| 233 |
|
|
IF(HAVE_LONG_LONG) |
| 234 |
ph10 |
318 |
SET(pcre_have_long_long 1) |
| 235 |
ph10 |
137 |
ENDIF(HAVE_LONG_LONG) |
| 236 |
|
|
|
| 237 |
|
|
IF(HAVE_UNSIGNED_LONG_LONG) |
| 238 |
ph10 |
318 |
SET(pcre_have_ulong_long 1) |
| 239 |
ph10 |
137 |
ENDIF(HAVE_UNSIGNED_LONG_LONG) |
| 240 |
|
|
|
| 241 |
ph10 |
144 |
IF(NOT BUILD_SHARED_LIBS) |
| 242 |
ph10 |
318 |
SET(PCRE_STATIC 1) |
| 243 |
ph10 |
144 |
ENDIF(NOT BUILD_SHARED_LIBS) |
| 244 |
|
|
|
| 245 |
chpe |
1055 |
IF(NOT PCRE_BUILD_PCRE8 AND NOT PCRE_BUILD_PCRE16 AND NOT PCRE_BUILD_PCRE32) |
| 246 |
chpe |
1105 |
MESSAGE(FATAL_ERROR "At least one of PCRE_BUILD_PCRE8, PCRE_BUILD_PCRE16 or PCRE_BUILD_PCRE32 must be enabled") |
| 247 |
chpe |
1055 |
ENDIF(NOT PCRE_BUILD_PCRE8 AND NOT PCRE_BUILD_PCRE16 AND NOT PCRE_BUILD_PCRE32) |
| 248 |
zherczeg |
863 |
|
| 249 |
|
|
IF(PCRE_BUILD_PCRE8) |
| 250 |
|
|
SET(SUPPORT_PCRE8 1) |
| 251 |
|
|
ENDIF(PCRE_BUILD_PCRE8) |
| 252 |
|
|
|
| 253 |
|
|
IF(PCRE_BUILD_PCRE16) |
| 254 |
|
|
SET(SUPPORT_PCRE16 1) |
| 255 |
|
|
ENDIF(PCRE_BUILD_PCRE16) |
| 256 |
|
|
|
| 257 |
chpe |
1055 |
IF(PCRE_BUILD_PCRE32) |
| 258 |
|
|
SET(SUPPORT_PCRE32 1) |
| 259 |
|
|
ENDIF(PCRE_BUILD_PCRE32) |
| 260 |
|
|
|
| 261 |
zherczeg |
863 |
IF(PCRE_BUILD_PCRECPP AND NOT PCRE_BUILD_PCRE8) |
| 262 |
|
|
MESSAGE(STATUS "** PCRE_BUILD_PCRE8 must be enabled for the C++ library support") |
| 263 |
|
|
SET(PCRE_BUILD_PCRECPP OFF) |
| 264 |
|
|
ENDIF(PCRE_BUILD_PCRECPP AND NOT PCRE_BUILD_PCRE8) |
| 265 |
|
|
|
| 266 |
|
|
IF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUILD_PCRE8) |
| 267 |
|
|
MESSAGE(STATUS "** PCRE_BUILD_PCRE8 must be enabled for the pcregrep program") |
| 268 |
|
|
SET(PCRE_BUILD_PCREGREP OFF) |
| 269 |
|
|
ENDIF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUILD_PCRE8) |
| 270 |
|
|
|
| 271 |
ph10 |
939 |
IF(PCRE_SUPPORT_LIBREADLINE AND PCRE_SUPPORT_LIBEDIT) |
| 272 |
|
|
MESSAGE(FATAL_ERROR "Only one of libreadline or libeditline can be specified") |
| 273 |
|
|
ENDIF(PCRE_SUPPORT_LIBREADLINE AND PCRE_SUPPORT_LIBEDIT) |
| 274 |
|
|
|
| 275 |
ph10 |
258 |
IF(PCRE_SUPPORT_BSR_ANYCRLF) |
| 276 |
ph10 |
318 |
SET(BSR_ANYCRLF 1) |
| 277 |
ph10 |
258 |
ENDIF(PCRE_SUPPORT_BSR_ANYCRLF) |
| 278 |
|
|
|
| 279 |
ph10 |
865 |
IF(PCRE_SUPPORT_UTF OR PCRE_SUPPORT_UNICODE_PROPERTIES) |
| 280 |
zherczeg |
863 |
SET(SUPPORT_UTF 1) |
| 281 |
|
|
SET(PCRE_SUPPORT_UTF ON) |
| 282 |
ph10 |
865 |
ENDIF(PCRE_SUPPORT_UTF OR PCRE_SUPPORT_UNICODE_PROPERTIES) |
| 283 |
ph10 |
137 |
|
| 284 |
|
|
IF(PCRE_SUPPORT_UNICODE_PROPERTIES) |
| 285 |
ph10 |
318 |
SET(SUPPORT_UCP 1) |
| 286 |
ph10 |
137 |
ENDIF(PCRE_SUPPORT_UNICODE_PROPERTIES) |
| 287 |
|
|
|
| 288 |
ph10 |
667 |
IF(PCRE_SUPPORT_JIT) |
| 289 |
|
|
SET(SUPPORT_JIT 1) |
| 290 |
ph10 |
691 |
ENDIF(PCRE_SUPPORT_JIT) |
| 291 |
ph10 |
667 |
|
| 292 |
ph10 |
685 |
IF(PCRE_SUPPORT_PCREGREP_JIT) |
| 293 |
|
|
SET(SUPPORT_PCREGREP_JIT 1) |
| 294 |
ph10 |
691 |
ENDIF(PCRE_SUPPORT_PCREGREP_JIT) |
| 295 |
ph10 |
685 |
|
| 296 |
ph10 |
1162 |
IF(PCRE_SUPPORT_VALGRIND) |
| 297 |
|
|
SET(SUPPORT_VALGRIND 1) |
| 298 |
|
|
ENDIF(PCRE_SUPPORT_VALGRIND) |
| 299 |
|
|
|
| 300 |
|
|
IF(PCRE_SUPPORT_COVERAGE) |
| 301 |
|
|
SET(SUPPORT_GCOV 1) |
| 302 |
ph10 |
1167 |
IF(NOT CMAKE_COMPILER_IS_GNUCC) |
| 303 |
ph10 |
1221 |
MESSAGE(FATAL_ERROR "Code coverage reports can only be generated when using GCC") |
| 304 |
|
|
ENDIF(NOT CMAKE_COMPILER_IS_GNUCC) |
| 305 |
|
|
ENDIF(PCRE_SUPPORT_COVERAGE) |
| 306 |
ph10 |
1162 |
|
| 307 |
ph10 |
344 |
# This next one used to contain |
| 308 |
|
|
# SET(PCRETEST_LIBS ${READLINE_LIBRARY}) |
| 309 |
|
|
# but I was advised to add the NCURSES test as well, along with |
| 310 |
|
|
# some modifications to cmake/FindReadline.cmake which should |
| 311 |
|
|
# make it possible to override the default if necessary. PH |
| 312 |
|
|
|
| 313 |
ph10 |
291 |
IF(PCRE_SUPPORT_LIBREADLINE) |
| 314 |
|
|
SET(SUPPORT_LIBREADLINE 1) |
| 315 |
ph10 |
344 |
SET(PCRETEST_LIBS ${READLINE_LIBRARY} ${NCURSES_LIBRARY}) |
| 316 |
ph10 |
291 |
ENDIF(PCRE_SUPPORT_LIBREADLINE) |
| 317 |
|
|
|
| 318 |
ph10 |
939 |
# libedit is a plug-compatible alternative to libreadline |
| 319 |
|
|
|
| 320 |
|
|
IF(PCRE_SUPPORT_LIBEDIT) |
| 321 |
|
|
SET(SUPPORT_LIBEDIT 1) |
| 322 |
|
|
SET(PCRETEST_LIBS ${EDITLINE_LIBRARY} ${NCURSES_LIBRARY}) |
| 323 |
|
|
ENDIF(PCRE_SUPPORT_LIBEDIT) |
| 324 |
|
|
|
| 325 |
ph10 |
291 |
IF(PCRE_SUPPORT_LIBZ) |
| 326 |
|
|
SET(SUPPORT_LIBZ 1) |
| 327 |
ph10 |
303 |
SET(PCREGREP_LIBS ${PCREGREP_LIBS} ${ZLIB_LIBRARIES}) |
| 328 |
ph10 |
291 |
ENDIF(PCRE_SUPPORT_LIBZ) |
| 329 |
|
|
|
| 330 |
|
|
IF(PCRE_SUPPORT_LIBBZ2) |
| 331 |
|
|
SET(SUPPORT_LIBBZ2 1) |
| 332 |
ph10 |
303 |
SET(PCREGREP_LIBS ${PCREGREP_LIBS} ${BZIP2_LIBRARIES}) |
| 333 |
ph10 |
292 |
ENDIF(PCRE_SUPPORT_LIBBZ2) |
| 334 |
ph10 |
291 |
|
| 335 |
ph10 |
144 |
SET(NEWLINE "") |
| 336 |
|
|
|
| 337 |
ph10 |
137 |
IF(PCRE_NEWLINE STREQUAL "LF") |
| 338 |
ph10 |
318 |
SET(NEWLINE "10") |
| 339 |
ph10 |
144 |
ENDIF(PCRE_NEWLINE STREQUAL "LF") |
| 340 |
|
|
IF(PCRE_NEWLINE STREQUAL "CR") |
| 341 |
ph10 |
318 |
SET(NEWLINE "13") |
| 342 |
ph10 |
144 |
ENDIF(PCRE_NEWLINE STREQUAL "CR") |
| 343 |
|
|
IF(PCRE_NEWLINE STREQUAL "CRLF") |
| 344 |
ph10 |
318 |
SET(NEWLINE "3338") |
| 345 |
ph10 |
144 |
ENDIF(PCRE_NEWLINE STREQUAL "CRLF") |
| 346 |
|
|
IF(PCRE_NEWLINE STREQUAL "ANY") |
| 347 |
ph10 |
318 |
SET(NEWLINE "-1") |
| 348 |
ph10 |
144 |
ENDIF(PCRE_NEWLINE STREQUAL "ANY") |
| 349 |
ph10 |
258 |
IF(PCRE_NEWLINE STREQUAL "ANYCRLF") |
| 350 |
ph10 |
318 |
SET(NEWLINE "-2") |
| 351 |
ph10 |
258 |
ENDIF(PCRE_NEWLINE STREQUAL "ANYCRLF") |
| 352 |
ph10 |
144 |
|
| 353 |
|
|
IF(NEWLINE STREQUAL "") |
| 354 |
ph10 |
318 |
MESSAGE(FATAL_ERROR "The PCRE_NEWLINE variable must be set to one of the following values: \"LF\", \"CR\", \"CRLF\", \"ANY\", \"ANYCRLF\".") |
| 355 |
ph10 |
144 |
ENDIF(NEWLINE STREQUAL "") |
| 356 |
ph10 |
137 |
|
| 357 |
|
|
IF(PCRE_EBCDIC) |
| 358 |
ph10 |
318 |
SET(EBCDIC 1) |
| 359 |
ph10 |
1028 |
IF(PCRE_NEWLINE STREQUAL "LF") |
| 360 |
|
|
SET(NEWLINE "21") |
| 361 |
|
|
ENDIF(PCRE_NEWLINE STREQUAL "LF") |
| 362 |
|
|
IF(PCRE_NEWLINE STREQUAL "CRLF") |
| 363 |
|
|
SET(NEWLINE "3349") |
| 364 |
|
|
ENDIF(PCRE_NEWLINE STREQUAL "CRLF") |
| 365 |
ph10 |
137 |
ENDIF(PCRE_EBCDIC) |
| 366 |
|
|
|
| 367 |
ph10 |
1028 |
IF(PCRE_EBCDIC_NL25) |
| 368 |
|
|
SET(EBCDIC 1) |
| 369 |
|
|
SET(EBCDIC_NL25 1) |
| 370 |
|
|
IF(PCRE_NEWLINE STREQUAL "LF") |
| 371 |
|
|
SET(NEWLINE "37") |
| 372 |
|
|
ENDIF(PCRE_NEWLINE STREQUAL "LF") |
| 373 |
|
|
IF(PCRE_NEWLINE STREQUAL "CRLF") |
| 374 |
|
|
SET(NEWLINE "3365") |
| 375 |
|
|
ENDIF(PCRE_NEWLINE STREQUAL "CRLF") |
| 376 |
ph10 |
1221 |
ENDIF(PCRE_EBCDIC_NL25) |
| 377 |
ph10 |
1028 |
|
| 378 |
ph10 |
137 |
IF(PCRE_NO_RECURSE) |
| 379 |
ph10 |
318 |
SET(NO_RECURSE 1) |
| 380 |
ph10 |
137 |
ENDIF(PCRE_NO_RECURSE) |
| 381 |
|
|
|
| 382 |
|
|
# Output files |
| 383 |
|
|
CONFIGURE_FILE(config-cmake.h.in |
| 384 |
ph10 |
405 |
${PROJECT_BINARY_DIR}/config.h |
| 385 |
ph10 |
137 |
@ONLY) |
| 386 |
|
|
|
| 387 |
ph10 |
886 |
# Parse version numbers and date out of configure.ac |
| 388 |
|
|
|
| 389 |
|
|
file(STRINGS ${PROJECT_SOURCE_DIR}/configure.ac |
| 390 |
|
|
configure_lines |
| 391 |
|
|
LIMIT_COUNT 50 # Read only the first 50 lines of the file |
| 392 |
|
|
) |
| 393 |
|
|
|
| 394 |
|
|
set(SEARCHED_VARIABLES "pcre_major" "pcre_minor" "pcre_prerelease" "pcre_date") |
| 395 |
|
|
foreach(configure_line ${configure_lines}) |
| 396 |
|
|
foreach(_substitution_variable ${SEARCHED_VARIABLES}) |
| 397 |
|
|
string(TOUPPER ${_substitution_variable} _substitution_variable_upper) |
| 398 |
|
|
if (NOT ${_substitution_variable_upper}) |
| 399 |
|
|
string(REGEX MATCH "m4_define\\(${_substitution_variable}, \\[(.*)\\]" MACTHED_STRING ${configure_line}) |
| 400 |
|
|
if (CMAKE_MATCH_1) |
| 401 |
|
|
set(${_substitution_variable_upper} ${CMAKE_MATCH_1}) |
| 402 |
|
|
endif() |
| 403 |
|
|
endif() |
| 404 |
|
|
endforeach() |
| 405 |
|
|
endforeach() |
| 406 |
|
|
|
| 407 |
|
|
CONFIGURE_FILE(pcre.h.in |
| 408 |
ph10 |
405 |
${PROJECT_BINARY_DIR}/pcre.h |
| 409 |
ph10 |
886 |
@ONLY) |
| 410 |
ph10 |
137 |
|
| 411 |
|
|
# What about pcre-config and libpcre.pc? |
| 412 |
|
|
|
| 413 |
|
|
IF(PCRE_BUILD_PCRECPP) |
| 414 |
ph10 |
318 |
CONFIGURE_FILE(pcre_stringpiece.h.in |
| 415 |
ph10 |
405 |
${PROJECT_BINARY_DIR}/pcre_stringpiece.h |
| 416 |
ph10 |
318 |
@ONLY) |
| 417 |
ph10 |
137 |
|
| 418 |
ph10 |
318 |
CONFIGURE_FILE(pcrecpparg.h.in |
| 419 |
ph10 |
405 |
${PROJECT_BINARY_DIR}/pcrecpparg.h |
| 420 |
ph10 |
318 |
@ONLY) |
| 421 |
ph10 |
137 |
ENDIF(PCRE_BUILD_PCRECPP) |
| 422 |
|
|
|
| 423 |
|
|
# Character table generation |
| 424 |
|
|
|
| 425 |
ph10 |
303 |
OPTION(PCRE_REBUILD_CHARTABLES "Rebuild char tables" OFF) |
| 426 |
|
|
IF(PCRE_REBUILD_CHARTABLES) |
| 427 |
|
|
ADD_EXECUTABLE(dftables dftables.c) |
| 428 |
ph10 |
137 |
|
| 429 |
ph10 |
303 |
GET_TARGET_PROPERTY(DFTABLES_EXE dftables LOCATION) |
| 430 |
ph10 |
137 |
|
| 431 |
ph10 |
303 |
ADD_CUSTOM_COMMAND( |
| 432 |
|
|
COMMENT "Generating character tables (pcre_chartables.c) for current locale" |
| 433 |
|
|
DEPENDS dftables |
| 434 |
|
|
COMMAND ${DFTABLES_EXE} |
| 435 |
ph10 |
405 |
ARGS ${PROJECT_BINARY_DIR}/pcre_chartables.c |
| 436 |
|
|
OUTPUT ${PROJECT_BINARY_DIR}/pcre_chartables.c |
| 437 |
ph10 |
303 |
) |
| 438 |
|
|
ELSE(PCRE_REBUILD_CHARTABLES) |
| 439 |
ph10 |
405 |
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/pcre_chartables.c.dist |
| 440 |
|
|
${PROJECT_BINARY_DIR}/pcre_chartables.c |
| 441 |
ph10 |
303 |
COPYONLY) |
| 442 |
|
|
ENDIF(PCRE_REBUILD_CHARTABLES) |
| 443 |
ph10 |
137 |
|
| 444 |
|
|
# Source code |
| 445 |
|
|
|
| 446 |
ph10 |
405 |
SET(PCRE_HEADERS ${PROJECT_BINARY_DIR}/pcre.h) |
| 447 |
ph10 |
137 |
|
| 448 |
zherczeg |
863 |
IF(PCRE_BUILD_PCRE8) |
| 449 |
ph10 |
137 |
SET(PCRE_SOURCES |
| 450 |
zherczeg |
864 |
pcre_byte_order.c |
| 451 |
ph10 |
836 |
pcre_chartables.c |
| 452 |
ph10 |
303 |
pcre_compile.c |
| 453 |
|
|
pcre_config.c |
| 454 |
|
|
pcre_dfa_exec.c |
| 455 |
|
|
pcre_exec.c |
| 456 |
|
|
pcre_fullinfo.c |
| 457 |
|
|
pcre_get.c |
| 458 |
|
|
pcre_globals.c |
| 459 |
ph10 |
667 |
pcre_jit_compile.c |
| 460 |
ph10 |
853 |
pcre_maketables.c |
| 461 |
ph10 |
303 |
pcre_newline.c |
| 462 |
|
|
pcre_ord2utf8.c |
| 463 |
|
|
pcre_refcount.c |
| 464 |
ph10 |
903 |
pcre_string_utils.c |
| 465 |
ph10 |
303 |
pcre_study.c |
| 466 |
|
|
pcre_tables.c |
| 467 |
ph10 |
351 |
pcre_ucd.c |
| 468 |
ph10 |
303 |
pcre_valid_utf8.c |
| 469 |
|
|
pcre_version.c |
| 470 |
|
|
pcre_xclass.c |
| 471 |
ph10 |
137 |
) |
| 472 |
|
|
|
| 473 |
|
|
SET(PCREPOSIX_HEADERS pcreposix.h) |
| 474 |
|
|
|
| 475 |
|
|
SET(PCREPOSIX_SOURCES pcreposix.c) |
| 476 |
|
|
|
| 477 |
zherczeg |
863 |
ENDIF(PCRE_BUILD_PCRE8) |
| 478 |
|
|
|
| 479 |
|
|
IF(PCRE_BUILD_PCRE16) |
| 480 |
|
|
SET(PCRE16_SOURCES |
| 481 |
|
|
pcre16_byte_order.c |
| 482 |
|
|
pcre16_chartables.c |
| 483 |
|
|
pcre16_compile.c |
| 484 |
|
|
pcre16_config.c |
| 485 |
|
|
pcre16_dfa_exec.c |
| 486 |
|
|
pcre16_exec.c |
| 487 |
|
|
pcre16_fullinfo.c |
| 488 |
|
|
pcre16_get.c |
| 489 |
|
|
pcre16_globals.c |
| 490 |
|
|
pcre16_jit_compile.c |
| 491 |
|
|
pcre16_maketables.c |
| 492 |
|
|
pcre16_newline.c |
| 493 |
|
|
pcre16_ord2utf16.c |
| 494 |
|
|
pcre16_refcount.c |
| 495 |
|
|
pcre16_string_utils.c |
| 496 |
|
|
pcre16_study.c |
| 497 |
|
|
pcre16_tables.c |
| 498 |
|
|
pcre16_ucd.c |
| 499 |
|
|
pcre16_utf16_utils.c |
| 500 |
|
|
pcre16_valid_utf16.c |
| 501 |
|
|
pcre16_version.c |
| 502 |
|
|
pcre16_xclass.c |
| 503 |
|
|
) |
| 504 |
|
|
ENDIF(PCRE_BUILD_PCRE16) |
| 505 |
|
|
|
| 506 |
chpe |
1055 |
IF(PCRE_BUILD_PCRE32) |
| 507 |
|
|
SET(PCRE32_SOURCES |
| 508 |
|
|
pcre32_byte_order.c |
| 509 |
|
|
pcre32_chartables.c |
| 510 |
|
|
pcre32_compile.c |
| 511 |
|
|
pcre32_config.c |
| 512 |
|
|
pcre32_dfa_exec.c |
| 513 |
|
|
pcre32_exec.c |
| 514 |
|
|
pcre32_fullinfo.c |
| 515 |
|
|
pcre32_get.c |
| 516 |
|
|
pcre32_globals.c |
| 517 |
|
|
pcre32_jit_compile.c |
| 518 |
|
|
pcre32_maketables.c |
| 519 |
|
|
pcre32_newline.c |
| 520 |
|
|
pcre32_ord2utf32.c |
| 521 |
|
|
pcre32_refcount.c |
| 522 |
|
|
pcre32_string_utils.c |
| 523 |
|
|
pcre32_study.c |
| 524 |
|
|
pcre32_tables.c |
| 525 |
|
|
pcre32_ucd.c |
| 526 |
|
|
pcre32_utf32_utils.c |
| 527 |
|
|
pcre32_valid_utf32.c |
| 528 |
|
|
pcre32_version.c |
| 529 |
|
|
pcre32_xclass.c |
| 530 |
|
|
) |
| 531 |
|
|
ENDIF(PCRE_BUILD_PCRE32) |
| 532 |
|
|
|
| 533 |
ph10 |
719 |
IF(MINGW AND NOT PCRE_STATIC) |
| 534 |
|
|
IF (EXISTS ${PROJECT_SOURCE_DIR}/pcre.rc) |
| 535 |
|
|
ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/pcre.o |
| 536 |
|
|
PRE-LINK |
| 537 |
|
|
COMMAND windres ARGS pcre.rc pcre.o |
| 538 |
|
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} |
| 539 |
|
|
COMMENT Using pcre coff info in mingw build) |
| 540 |
|
|
SET(PCRE_SOURCES |
| 541 |
|
|
${PCRE_SOURCES} ${PROJECT_SOURCE_DIR}/pcre.o |
| 542 |
|
|
) |
| 543 |
|
|
ENDIF(EXISTS ${PROJECT_SOURCE_DIR}/pcre.rc) |
| 544 |
|
|
IF (EXISTS ${PROJECT_SOURCE_DIR}/pcreposix.rc) |
| 545 |
|
|
ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/pcreposix.o |
| 546 |
|
|
PRE-LINK |
| 547 |
|
|
COMMAND windres ARGS pcreposix.rc pcreposix.o |
| 548 |
|
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} |
| 549 |
|
|
COMMENT Using pcreposix coff info in mingw build) |
| 550 |
|
|
SET(PCREPOSIX_SOURCES |
| 551 |
|
|
${PCREPOSIX_SOURCES} ${PROJECT_SOURCE_DIR}/pcreposix.o |
| 552 |
|
|
) |
| 553 |
|
|
ENDIF(EXISTS ${PROJECT_SOURCE_DIR}/pcreposix.rc) |
| 554 |
|
|
ENDIF(MINGW AND NOT PCRE_STATIC) |
| 555 |
|
|
|
| 556 |
ph10 |
137 |
SET(PCRECPP_HEADERS |
| 557 |
ph10 |
303 |
pcrecpp.h |
| 558 |
|
|
pcre_scanner.h |
| 559 |
ph10 |
405 |
${PROJECT_BINARY_DIR}/pcrecpparg.h |
| 560 |
|
|
${PROJECT_BINARY_DIR}/pcre_stringpiece.h |
| 561 |
ph10 |
137 |
) |
| 562 |
|
|
|
| 563 |
|
|
SET(PCRECPP_SOURCES |
| 564 |
ph10 |
318 |
pcrecpp.cc |
| 565 |
|
|
pcre_scanner.cc |
| 566 |
|
|
pcre_stringpiece.cc |
| 567 |
ph10 |
137 |
) |
| 568 |
|
|
|
| 569 |
|
|
# Build setup |
| 570 |
|
|
|
| 571 |
|
|
ADD_DEFINITIONS(-DHAVE_CONFIG_H) |
| 572 |
|
|
|
| 573 |
ph10 |
303 |
IF(MSVC) |
| 574 |
ph10 |
1234 |
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS) |
| 575 |
ph10 |
303 |
ENDIF(MSVC) |
| 576 |
ph10 |
137 |
|
| 577 |
|
|
SET(CMAKE_INCLUDE_CURRENT_DIR 1) |
| 578 |
ph10 |
303 |
# needed to make sure to not link debug libs |
| 579 |
|
|
# against release libs and vice versa |
| 580 |
|
|
IF(WIN32) |
| 581 |
|
|
SET(CMAKE_DEBUG_POSTFIX "d") |
| 582 |
|
|
ENDIF(WIN32) |
| 583 |
ph10 |
137 |
|
| 584 |
ph10 |
407 |
SET(targets) |
| 585 |
|
|
|
| 586 |
ph10 |
137 |
# Libraries |
| 587 |
ph10 |
318 |
# pcre |
| 588 |
zherczeg |
863 |
IF(PCRE_BUILD_PCRE8) |
| 589 |
ph10 |
405 |
ADD_LIBRARY(pcre ${PCRE_HEADERS} ${PCRE_SOURCES} ${PROJECT_BINARY_DIR}/config.h) |
| 590 |
ph10 |
407 |
SET(targets ${targets} pcre) |
| 591 |
ph10 |
137 |
ADD_LIBRARY(pcreposix ${PCREPOSIX_HEADERS} ${PCREPOSIX_SOURCES}) |
| 592 |
ph10 |
407 |
SET(targets ${targets} pcreposix) |
| 593 |
ph10 |
137 |
TARGET_LINK_LIBRARIES(pcreposix pcre) |
| 594 |
zherczeg |
863 |
|
| 595 |
ph10 |
318 |
IF(MINGW AND NOT PCRE_STATIC) |
| 596 |
|
|
IF(NON_STANDARD_LIB_PREFIX) |
| 597 |
|
|
SET_TARGET_PROPERTIES(pcre pcreposix |
| 598 |
ph10 |
311 |
PROPERTIES PREFIX "" |
| 599 |
ph10 |
318 |
) |
| 600 |
|
|
ENDIF(NON_STANDARD_LIB_PREFIX) |
| 601 |
ph10 |
311 |
|
| 602 |
ph10 |
318 |
IF(NON_STANDARD_LIB_SUFFIX) |
| 603 |
|
|
SET_TARGET_PROPERTIES(pcre pcreposix |
| 604 |
ph10 |
311 |
PROPERTIES SUFFIX "-0.dll" |
| 605 |
ph10 |
318 |
) |
| 606 |
|
|
ENDIF(NON_STANDARD_LIB_SUFFIX) |
| 607 |
|
|
ENDIF(MINGW AND NOT PCRE_STATIC) |
| 608 |
ph10 |
311 |
|
| 609 |
zherczeg |
863 |
ENDIF(PCRE_BUILD_PCRE8) |
| 610 |
ph10 |
318 |
|
| 611 |
zherczeg |
863 |
IF(PCRE_BUILD_PCRE16) |
| 612 |
|
|
ADD_LIBRARY(pcre16 ${PCRE_HEADERS} ${PCRE16_SOURCES} ${PROJECT_BINARY_DIR}/config.h) |
| 613 |
|
|
SET(targets ${targets} pcre16) |
| 614 |
|
|
|
| 615 |
|
|
IF(MINGW AND NOT PCRE_STATIC) |
| 616 |
|
|
IF(NON_STANDARD_LIB_PREFIX) |
| 617 |
|
|
SET_TARGET_PROPERTIES(pcre16 |
| 618 |
|
|
PROPERTIES PREFIX "" |
| 619 |
|
|
) |
| 620 |
|
|
ENDIF(NON_STANDARD_LIB_PREFIX) |
| 621 |
|
|
|
| 622 |
|
|
IF(NON_STANDARD_LIB_SUFFIX) |
| 623 |
|
|
SET_TARGET_PROPERTIES(pcre16 |
| 624 |
|
|
PROPERTIES SUFFIX "-0.dll" |
| 625 |
|
|
) |
| 626 |
|
|
ENDIF(NON_STANDARD_LIB_SUFFIX) |
| 627 |
|
|
ENDIF(MINGW AND NOT PCRE_STATIC) |
| 628 |
|
|
|
| 629 |
|
|
ENDIF(PCRE_BUILD_PCRE16) |
| 630 |
|
|
|
| 631 |
chpe |
1055 |
IF(PCRE_BUILD_PCRE32) |
| 632 |
|
|
ADD_LIBRARY(pcre32 ${PCRE_HEADERS} ${PCRE32_SOURCES} ${PROJECT_BINARY_DIR}/config.h) |
| 633 |
|
|
SET(targets ${targets} pcre32) |
| 634 |
|
|
|
| 635 |
|
|
IF(MINGW AND NOT PCRE_STATIC) |
| 636 |
|
|
IF(NON_STANDARD_LIB_PREFIX) |
| 637 |
|
|
SET_TARGET_PROPERTIES(pcre32 |
| 638 |
|
|
PROPERTIES PREFIX "" |
| 639 |
|
|
) |
| 640 |
|
|
ENDIF(NON_STANDARD_LIB_PREFIX) |
| 641 |
|
|
|
| 642 |
|
|
IF(NON_STANDARD_LIB_SUFFIX) |
| 643 |
|
|
SET_TARGET_PROPERTIES(pcre32 |
| 644 |
|
|
PROPERTIES SUFFIX "-0.dll" |
| 645 |
|
|
) |
| 646 |
|
|
ENDIF(NON_STANDARD_LIB_SUFFIX) |
| 647 |
|
|
ENDIF(MINGW AND NOT PCRE_STATIC) |
| 648 |
|
|
|
| 649 |
|
|
ENDIF(PCRE_BUILD_PCRE32) |
| 650 |
|
|
|
| 651 |
ph10 |
318 |
# pcrecpp |
| 652 |
ph10 |
137 |
IF(PCRE_BUILD_PCRECPP) |
| 653 |
zherczeg |
863 |
ADD_LIBRARY(pcrecpp ${PCRECPP_HEADERS} ${PCRECPP_SOURCES}) |
| 654 |
ph10 |
407 |
SET(targets ${targets} pcrecpp) |
| 655 |
zherczeg |
863 |
TARGET_LINK_LIBRARIES(pcrecpp pcre) |
| 656 |
ph10 |
311 |
|
| 657 |
ph10 |
318 |
IF(MINGW AND NOT PCRE_STATIC) |
| 658 |
|
|
IF(NON_STANDARD_LIB_PREFIX) |
| 659 |
|
|
SET_TARGET_PROPERTIES(pcrecpp |
| 660 |
|
|
PROPERTIES PREFIX "" |
| 661 |
|
|
) |
| 662 |
|
|
ENDIF(NON_STANDARD_LIB_PREFIX) |
| 663 |
|
|
|
| 664 |
|
|
IF(NON_STANDARD_LIB_SUFFIX) |
| 665 |
|
|
SET_TARGET_PROPERTIES(pcrecpp |
| 666 |
|
|
PROPERTIES SUFFIX "-0.dll" |
| 667 |
|
|
) |
| 668 |
|
|
ENDIF(NON_STANDARD_LIB_SUFFIX) |
| 669 |
|
|
ENDIF(MINGW AND NOT PCRE_STATIC) |
| 670 |
ph10 |
137 |
ENDIF(PCRE_BUILD_PCRECPP) |
| 671 |
|
|
|
| 672 |
ph10 |
318 |
|
| 673 |
ph10 |
137 |
# Executables |
| 674 |
|
|
|
| 675 |
ph10 |
312 |
# Removed by PH (2008-01-23) because pcredemo shouldn't really be built |
| 676 |
|
|
# automatically, and it gave trouble in some environments anyway. |
| 677 |
|
|
# ADD_EXECUTABLE(pcredemo pcredemo.c) |
| 678 |
|
|
# TARGET_LINK_LIBRARIES(pcredemo pcreposix) |
| 679 |
|
|
# IF(NOT BUILD_SHARED_LIBS) |
| 680 |
|
|
# # make sure to not use declspec(dllimport) in static mode on windows |
| 681 |
ph10 |
318 |
# SET_TARGET_PROPERTIES(pcredemo PROPERTIES COMPILE_FLAGS "-DPCRE_STATIC") |
| 682 |
ph10 |
312 |
# ENDIF(NOT BUILD_SHARED_LIBS) |
| 683 |
ph10 |
303 |
|
| 684 |
zherczeg |
863 |
IF(PCRE_BUILD_PCREGREP) |
| 685 |
ph10 |
407 |
ADD_EXECUTABLE(pcregrep pcregrep.c) |
| 686 |
|
|
SET(targets ${targets} pcregrep) |
| 687 |
|
|
TARGET_LINK_LIBRARIES(pcregrep pcreposix ${PCREGREP_LIBS}) |
| 688 |
zherczeg |
863 |
ENDIF(PCRE_BUILD_PCREGREP) |
| 689 |
ph10 |
144 |
|
| 690 |
ph10 |
407 |
# Testing |
| 691 |
|
|
IF(PCRE_BUILD_TESTS) |
| 692 |
|
|
ENABLE_TESTING() |
| 693 |
ph10 |
144 |
|
| 694 |
zherczeg |
863 |
SET(PCRETEST_SOURCES pcretest.c) |
| 695 |
|
|
IF(PCRE_BUILD_PCRE8) |
| 696 |
|
|
LIST(APPEND PCRETEST_SOURCES pcre_printint.c) |
| 697 |
|
|
ENDIF(PCRE_BUILD_PCRE8) |
| 698 |
|
|
IF(PCRE_BUILD_PCRE16) |
| 699 |
|
|
LIST(APPEND PCRETEST_SOURCES pcre16_printint.c) |
| 700 |
|
|
ENDIF(PCRE_BUILD_PCRE16) |
| 701 |
chpe |
1055 |
IF(PCRE_BUILD_PCRE32) |
| 702 |
|
|
LIST(APPEND PCRETEST_SOURCES pcre32_printint.c) |
| 703 |
|
|
ENDIF(PCRE_BUILD_PCRE32) |
| 704 |
zherczeg |
863 |
|
| 705 |
|
|
ADD_EXECUTABLE(pcretest ${PCRETEST_SOURCES}) |
| 706 |
ph10 |
407 |
SET(targets ${targets} pcretest) |
| 707 |
zherczeg |
863 |
IF(PCRE_BUILD_PCRE8) |
| 708 |
|
|
LIST(APPEND PCRETEST_LIBS pcreposix pcre) |
| 709 |
|
|
ENDIF(PCRE_BUILD_PCRE8) |
| 710 |
|
|
IF(PCRE_BUILD_PCRE16) |
| 711 |
|
|
LIST(APPEND PCRETEST_LIBS pcre16) |
| 712 |
|
|
ENDIF(PCRE_BUILD_PCRE16) |
| 713 |
chpe |
1055 |
IF(PCRE_BUILD_PCRE32) |
| 714 |
|
|
LIST(APPEND PCRETEST_LIBS pcre32) |
| 715 |
|
|
ENDIF(PCRE_BUILD_PCRE32) |
| 716 |
zherczeg |
863 |
TARGET_LINK_LIBRARIES(pcretest ${PCRETEST_LIBS}) |
| 717 |
ph10 |
691 |
|
| 718 |
ph10 |
698 |
IF(PCRE_SUPPORT_JIT) |
| 719 |
ph10 |
667 |
ADD_EXECUTABLE(pcre_jit_test pcre_jit_test.c) |
| 720 |
|
|
SET(targets ${targets} pcre_jit_test) |
| 721 |
zherczeg |
863 |
SET(PCRE_JIT_TEST_LIBS ) |
| 722 |
|
|
IF(PCRE_BUILD_PCRE8) |
| 723 |
|
|
LIST(APPEND PCRE_JIT_TEST_LIBS pcre) |
| 724 |
|
|
ENDIF(PCRE_BUILD_PCRE8) |
| 725 |
|
|
IF(PCRE_BUILD_PCRE16) |
| 726 |
|
|
LIST(APPEND PCRE_JIT_TEST_LIBS pcre16) |
| 727 |
|
|
ENDIF(PCRE_BUILD_PCRE16) |
| 728 |
chpe |
1055 |
IF(PCRE_BUILD_PCRE32) |
| 729 |
|
|
LIST(APPEND PCRE_JIT_TEST_LIBS pcre32) |
| 730 |
|
|
ENDIF(PCRE_BUILD_PCRE32) |
| 731 |
zherczeg |
863 |
TARGET_LINK_LIBRARIES(pcre_jit_test ${PCRE_JIT_TEST_LIBS}) |
| 732 |
ph10 |
698 |
ENDIF(PCRE_SUPPORT_JIT) |
| 733 |
ph10 |
144 |
|
| 734 |
ph10 |
407 |
IF(PCRE_BUILD_PCRECPP) |
| 735 |
|
|
ADD_EXECUTABLE(pcrecpp_unittest pcrecpp_unittest.cc) |
| 736 |
|
|
SET(targets ${targets} pcrecpp_unittest) |
| 737 |
|
|
TARGET_LINK_LIBRARIES(pcrecpp_unittest pcrecpp) |
| 738 |
|
|
IF(MINGW AND NON_STANDARD_LIB_NAMES AND NOT PCRE_STATIC) |
| 739 |
|
|
SET_TARGET_PROPERTIES(pcrecpp |
| 740 |
|
|
PROPERTIES PREFIX "" |
| 741 |
|
|
) |
| 742 |
|
|
ENDIF(MINGW AND NON_STANDARD_LIB_NAMES AND NOT PCRE_STATIC) |
| 743 |
ph10 |
137 |
|
| 744 |
ph10 |
407 |
ADD_EXECUTABLE(pcre_scanner_unittest pcre_scanner_unittest.cc) |
| 745 |
|
|
SET(targets ${targets} pcre_scanner_unittest) |
| 746 |
|
|
TARGET_LINK_LIBRARIES(pcre_scanner_unittest pcrecpp) |
| 747 |
ph10 |
144 |
|
| 748 |
ph10 |
407 |
ADD_EXECUTABLE(pcre_stringpiece_unittest pcre_stringpiece_unittest.cc) |
| 749 |
|
|
SET(targets ${targets} pcre_stringpiece_unittest) |
| 750 |
|
|
TARGET_LINK_LIBRARIES(pcre_stringpiece_unittest pcrecpp) |
| 751 |
|
|
ENDIF(PCRE_BUILD_PCRECPP) |
| 752 |
ph10 |
144 |
|
| 753 |
ph10 |
719 |
# exes in Debug location tested by the RunTest shell script |
| 754 |
|
|
# via "make test" |
| 755 |
zherczeg |
863 |
IF(PCRE_BUILD_PCREGREP) |
| 756 |
|
|
GET_TARGET_PROPERTY(PCREGREP_EXE pcregrep DEBUG_LOCATION) |
| 757 |
|
|
ENDIF(PCRE_BUILD_PCREGREP) |
| 758 |
|
|
|
| 759 |
ph10 |
407 |
GET_TARGET_PROPERTY(PCRETEST_EXE pcretest DEBUG_LOCATION) |
| 760 |
ph10 |
137 |
|
| 761 |
ph10 |
719 |
# ================================================= |
| 762 |
|
|
# Write out a CTest configuration file |
| 763 |
ph10 |
407 |
# |
| 764 |
|
|
FILE(WRITE ${PROJECT_BINARY_DIR}/CTestCustom.ctest |
| 765 |
|
|
"# This is a generated file. |
| 766 |
ph10 |
719 |
MESSAGE(\"When testing is complete, review test output in the |
| 767 |
zherczeg |
1053 |
\\\"${PROJECT_BINARY_DIR}/Testing/Temporary\\\" folder.\") |
| 768 |
|
|
MESSAGE(\" \") |
| 769 |
ph10 |
719 |
") |
| 770 |
ph10 |
144 |
|
| 771 |
zherczeg |
863 |
FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_test.sh |
| 772 |
|
|
"#! /bin/sh |
| 773 |
ph10 |
719 |
# This is a generated file. |
| 774 |
|
|
srcdir=${PROJECT_SOURCE_DIR} |
| 775 |
|
|
pcretest=${PCRETEST_EXE} |
| 776 |
|
|
source ${PROJECT_SOURCE_DIR}/RunTest |
| 777 |
|
|
if test \"$?\" != \"0\"; then exit 1; fi |
| 778 |
|
|
# End |
| 779 |
|
|
") |
| 780 |
|
|
|
| 781 |
zherczeg |
863 |
IF(UNIX) |
| 782 |
|
|
ADD_TEST(pcre_test sh ${PROJECT_BINARY_DIR}/pcre_test.sh) |
| 783 |
|
|
ENDIF(UNIX) |
| 784 |
|
|
|
| 785 |
|
|
IF(PCRE_BUILD_PCREGREP) |
| 786 |
|
|
FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_grep_test.sh |
| 787 |
|
|
"#! /bin/sh |
| 788 |
ph10 |
719 |
# This is a generated file. |
| 789 |
|
|
srcdir=${PROJECT_SOURCE_DIR} |
| 790 |
|
|
pcregrep=${PCREGREP_EXE} |
| 791 |
|
|
pcretest=${PCRETEST_EXE} |
| 792 |
|
|
source ${PROJECT_SOURCE_DIR}/RunGrepTest |
| 793 |
|
|
if test \"$?\" != \"0\"; then exit 1; fi |
| 794 |
|
|
# End |
| 795 |
|
|
") |
| 796 |
|
|
|
| 797 |
zherczeg |
863 |
IF(UNIX) |
| 798 |
|
|
ADD_TEST(pcre_grep_test sh ${PROJECT_BINARY_DIR}/pcre_grep_test.sh) |
| 799 |
|
|
ENDIF(UNIX) |
| 800 |
|
|
ENDIF(PCRE_BUILD_PCREGREP) |
| 801 |
ph10 |
706 |
|
| 802 |
ph10 |
407 |
IF(WIN32) |
| 803 |
ph10 |
719 |
# Provide environment for executing the bat file version of RunTest |
| 804 |
zherczeg |
1053 |
FILE(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR} winsrc) |
| 805 |
|
|
FILE(TO_NATIVE_PATH ${PROJECT_BINARY_DIR} winbin) |
| 806 |
|
|
FILE(TO_NATIVE_PATH ${PCRETEST_EXE} winexe) |
| 807 |
ph10 |
719 |
|
| 808 |
zherczeg |
1053 |
FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_test.bat |
| 809 |
ph10 |
719 |
"\@REM This is a generated file. |
| 810 |
zherczeg |
1053 |
\@echo off |
| 811 |
ph10 |
719 |
setlocal |
| 812 |
zherczeg |
1053 |
SET srcdir=\"${winsrc}\" |
| 813 |
|
|
SET pcretest=\"${winexe}\" |
| 814 |
|
|
if not [%CMAKE_CONFIG_TYPE%]==[] SET pcretest=\"${winbin}\\%CMAKE_CONFIG_TYPE%\\pcretest.exe\" |
| 815 |
|
|
call %srcdir%\\RunTest.Bat |
| 816 |
ph10 |
719 |
if errorlevel 1 exit /b 1 |
| 817 |
|
|
echo RunTest.bat tests successfully completed |
| 818 |
|
|
") |
| 819 |
|
|
|
| 820 |
|
|
ADD_TEST(NAME pcre_test_bat |
| 821 |
zherczeg |
1053 |
COMMAND pcre_test.bat) |
| 822 |
ph10 |
719 |
SET_TESTS_PROPERTIES(pcre_test_bat PROPERTIES |
| 823 |
|
|
PASS_REGULAR_EXPRESSION "RunTest\\.bat tests successfully completed") |
| 824 |
|
|
|
| 825 |
ph10 |
706 |
IF("$ENV{OSTYPE}" STREQUAL "msys") |
| 826 |
zherczeg |
863 |
# Both the sh and bat file versions of RunTest are run if make test is used |
| 827 |
|
|
# in msys |
| 828 |
ph10 |
719 |
ADD_TEST(pcre_test_sh sh.exe ${PROJECT_BINARY_DIR}/pcre_test.sh) |
| 829 |
zherczeg |
863 |
IF(PCRE_BUILD_PCREGREP) |
| 830 |
|
|
ADD_TEST(pcre_grep_test sh.exe ${PROJECT_BINARY_DIR}/pcre_grep_test.sh) |
| 831 |
|
|
ENDIF(PCRE_BUILD_PCREGREP) |
| 832 |
|
|
ENDIF("$ENV{OSTYPE}" STREQUAL "msys") |
| 833 |
ph10 |
719 |
|
| 834 |
ph10 |
407 |
ENDIF(WIN32) |
| 835 |
ph10 |
144 |
|
| 836 |
ph10 |
719 |
# Changed to accommodate testing whichever location was just built |
| 837 |
|
|
|
| 838 |
ph10 |
698 |
IF(PCRE_SUPPORT_JIT) |
| 839 |
zherczeg |
863 |
ADD_TEST(pcre_jit_test pcre_jit_test) |
| 840 |
ph10 |
698 |
ENDIF(PCRE_SUPPORT_JIT) |
| 841 |
ph10 |
667 |
|
| 842 |
ph10 |
719 |
IF(PCRE_BUILD_PCRECPP) |
| 843 |
|
|
ADD_TEST(pcrecpp_test pcrecpp_unittest) |
| 844 |
|
|
ADD_TEST(pcre_scanner_test pcre_scanner_unittest) |
| 845 |
|
|
ADD_TEST(pcre_stringpiece_test pcre_stringpiece_unittest) |
| 846 |
zherczeg |
863 |
ENDIF(PCRE_BUILD_PCRECPP) |
| 847 |
ph10 |
144 |
|
| 848 |
ph10 |
407 |
ENDIF(PCRE_BUILD_TESTS) |
| 849 |
|
|
|
| 850 |
ph10 |
137 |
# Installation |
| 851 |
|
|
SET(CMAKE_INSTALL_ALWAYS 1) |
| 852 |
|
|
|
| 853 |
ph10 |
407 |
INSTALL(TARGETS ${targets} |
| 854 |
ph10 |
137 |
RUNTIME DESTINATION bin |
| 855 |
|
|
LIBRARY DESTINATION lib |
| 856 |
|
|
ARCHIVE DESTINATION lib) |
| 857 |
|
|
|
| 858 |
|
|
INSTALL(FILES ${PCRE_HEADERS} ${PCREPOSIX_HEADERS} DESTINATION include) |
| 859 |
|
|
|
| 860 |
ph10 |
405 |
FILE(GLOB html ${PROJECT_SOURCE_DIR}/doc/html/*.html) |
| 861 |
|
|
FILE(GLOB man1 ${PROJECT_SOURCE_DIR}/doc/*.1) |
| 862 |
|
|
FILE(GLOB man3 ${PROJECT_SOURCE_DIR}/doc/*.3) |
| 863 |
ph10 |
137 |
|
| 864 |
|
|
IF(PCRE_BUILD_PCRECPP) |
| 865 |
ph10 |
318 |
INSTALL(FILES ${PCRECPP_HEADERS} DESTINATION include) |
| 866 |
ph10 |
137 |
ELSE(PCRE_BUILD_PCRECPP) |
| 867 |
ph10 |
318 |
# Remove pcrecpp.3 |
| 868 |
|
|
FOREACH(man ${man3}) |
| 869 |
|
|
GET_FILENAME_COMPONENT(man_tmp ${man} NAME) |
| 870 |
|
|
IF(NOT man_tmp STREQUAL "pcrecpp.3") |
| 871 |
|
|
SET(man3_new ${man3} ${man}) |
| 872 |
|
|
ENDIF(NOT man_tmp STREQUAL "pcrecpp.3") |
| 873 |
|
|
ENDFOREACH(man ${man3}) |
| 874 |
|
|
SET(man3 ${man3_new}) |
| 875 |
ph10 |
137 |
ENDIF(PCRE_BUILD_PCRECPP) |
| 876 |
|
|
|
| 877 |
|
|
INSTALL(FILES ${man1} DESTINATION man/man1) |
| 878 |
|
|
INSTALL(FILES ${man3} DESTINATION man/man3) |
| 879 |
ph10 |
199 |
INSTALL(FILES ${html} DESTINATION share/doc/pcre/html) |
| 880 |
ph10 |
137 |
|
| 881 |
ph10 |
303 |
# help, only for nice output |
| 882 |
|
|
IF(BUILD_SHARED_LIBS) |
| 883 |
|
|
SET(BUILD_STATIC_LIBS OFF) |
| 884 |
|
|
ELSE(BUILD_SHARED_LIBS) |
| 885 |
|
|
SET(BUILD_STATIC_LIBS ON) |
| 886 |
|
|
ENDIF(BUILD_SHARED_LIBS) |
| 887 |
|
|
|
| 888 |
ph10 |
407 |
IF(PCRE_SHOW_REPORT) |
| 889 |
ph10 |
414 |
STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype) |
| 890 |
ph10 |
413 |
IF (CMAKE_C_FLAGS) |
| 891 |
|
|
SET(cfsp " ") |
| 892 |
ph10 |
416 |
ENDIF(CMAKE_C_FLAGS) |
| 893 |
ph10 |
413 |
IF (CMAKE_CXX_FLAGS) |
| 894 |
|
|
SET(cxxfsp " ") |
| 895 |
ph10 |
416 |
ENDIF(CMAKE_CXX_FLAGS) |
| 896 |
ph10 |
407 |
MESSAGE(STATUS "") |
| 897 |
|
|
MESSAGE(STATUS "") |
| 898 |
|
|
MESSAGE(STATUS "PCRE configuration summary:") |
| 899 |
|
|
MESSAGE(STATUS "") |
| 900 |
ph10 |
413 |
MESSAGE(STATUS " Install prefix .................. : ${CMAKE_INSTALL_PREFIX}") |
| 901 |
|
|
MESSAGE(STATUS " C compiler ...................... : ${CMAKE_C_COMPILER}") |
| 902 |
|
|
MESSAGE(STATUS " C++ compiler .................... : ${CMAKE_CXX_COMPILER}") |
| 903 |
|
|
MESSAGE(STATUS " C compiler flags ................ : ${CMAKE_C_FLAGS}${cfsp}${CMAKE_C_FLAGS_${buildtype}}") |
| 904 |
|
|
MESSAGE(STATUS " C++ compiler flags .............. : ${CMAKE_CXX_FLAGS}${cxxfsp}${CMAKE_CXX_FLAGS_${buildtype}}") |
| 905 |
ph10 |
407 |
MESSAGE(STATUS "") |
| 906 |
zherczeg |
863 |
MESSAGE(STATUS " Build 8 bit PCRE library ........ : ${PCRE_BUILD_PCRE8}") |
| 907 |
|
|
MESSAGE(STATUS " Build 16 bit PCRE library ....... : ${PCRE_BUILD_PCRE16}") |
| 908 |
chpe |
1055 |
MESSAGE(STATUS " Build 32 bit PCRE library ....... : ${PCRE_BUILD_PCRE32}") |
| 909 |
ph10 |
413 |
MESSAGE(STATUS " Build C++ library ............... : ${PCRE_BUILD_PCRECPP}") |
| 910 |
ph10 |
667 |
MESSAGE(STATUS " Enable JIT compiling support .... : ${PCRE_SUPPORT_JIT}") |
| 911 |
zherczeg |
863 |
MESSAGE(STATUS " Enable UTF support .............. : ${PCRE_SUPPORT_UTF}") |
| 912 |
ph10 |
413 |
MESSAGE(STATUS " Unicode properties .............. : ${PCRE_SUPPORT_UNICODE_PROPERTIES}") |
| 913 |
|
|
MESSAGE(STATUS " Newline char/sequence ........... : ${PCRE_NEWLINE}") |
| 914 |
|
|
MESSAGE(STATUS " \\R matches only ANYCRLF ......... : ${PCRE_SUPPORT_BSR_ANYCRLF}") |
| 915 |
|
|
MESSAGE(STATUS " EBCDIC coding ................... : ${PCRE_EBCDIC}") |
| 916 |
ph10 |
1028 |
MESSAGE(STATUS " EBCDIC coding with NL=0x25 ...... : ${PCRE_EBCDIC_NL25}") |
| 917 |
ph10 |
413 |
MESSAGE(STATUS " Rebuild char tables ............. : ${PCRE_REBUILD_CHARTABLES}") |
| 918 |
|
|
MESSAGE(STATUS " No stack recursion .............. : ${PCRE_NO_RECURSE}") |
| 919 |
|
|
MESSAGE(STATUS " POSIX mem threshold ............. : ${PCRE_POSIX_MALLOC_THRESHOLD}") |
| 920 |
|
|
MESSAGE(STATUS " Internal link size .............. : ${PCRE_LINK_SIZE}") |
| 921 |
|
|
MESSAGE(STATUS " Match limit ..................... : ${PCRE_MATCH_LIMIT}") |
| 922 |
|
|
MESSAGE(STATUS " Match limit recursion ........... : ${PCRE_MATCH_LIMIT_RECURSION}") |
| 923 |
|
|
MESSAGE(STATUS " Build shared libs ............... : ${BUILD_SHARED_LIBS}") |
| 924 |
|
|
MESSAGE(STATUS " Build static libs ............... : ${BUILD_STATIC_LIBS}") |
| 925 |
|
|
MESSAGE(STATUS " Build pcregrep .................. : ${PCRE_BUILD_PCREGREP}") |
| 926 |
ph10 |
685 |
MESSAGE(STATUS " Enable JIT in pcregrep .......... : ${PCRE_SUPPORT_PCREGREP_JIT}") |
| 927 |
ph10 |
655 |
MESSAGE(STATUS " Buffer size for pcregrep ........ : ${PCREGREP_BUFSIZE}") |
| 928 |
ph10 |
719 |
MESSAGE(STATUS " Build tests (implies pcretest .. : ${PCRE_BUILD_TESTS}") |
| 929 |
|
|
MESSAGE(STATUS " and pcregrep)") |
| 930 |
ph10 |
407 |
IF(ZLIB_FOUND) |
| 931 |
ph10 |
413 |
MESSAGE(STATUS " Link pcregrep with libz ......... : ${PCRE_SUPPORT_LIBZ}") |
| 932 |
ph10 |
407 |
ELSE(ZLIB_FOUND) |
| 933 |
ph10 |
939 |
MESSAGE(STATUS " Link pcregrep with libz ......... : Library not found" ) |
| 934 |
ph10 |
407 |
ENDIF(ZLIB_FOUND) |
| 935 |
|
|
IF(BZIP2_FOUND) |
| 936 |
ph10 |
413 |
MESSAGE(STATUS " Link pcregrep with libbz2 ....... : ${PCRE_SUPPORT_LIBBZ2}") |
| 937 |
ph10 |
407 |
ELSE(BZIP2_FOUND) |
| 938 |
ph10 |
939 |
MESSAGE(STATUS " Link pcregrep with libbz2 ....... : Library not found" ) |
| 939 |
ph10 |
407 |
ENDIF(BZIP2_FOUND) |
| 940 |
ph10 |
939 |
IF(EDITLINE_FOUND) |
| 941 |
|
|
MESSAGE(STATUS " Link pcretest with libeditline .. : ${PCRE_SUPPORT_LIBEDIT}") |
| 942 |
|
|
ELSE(EDITLINE_FOUND) |
| 943 |
|
|
MESSAGE(STATUS " Link pcretest with libeditline .. : Library not found" ) |
| 944 |
|
|
ENDIF(EDITLINE_FOUND) |
| 945 |
|
|
IF(READLINE_FOUND) |
| 946 |
ph10 |
413 |
MESSAGE(STATUS " Link pcretest with libreadline .. : ${PCRE_SUPPORT_LIBREADLINE}") |
| 947 |
ph10 |
939 |
ELSE(READLINE_FOUND) |
| 948 |
|
|
MESSAGE(STATUS " Link pcretest with libreadline .. : Library not found" ) |
| 949 |
|
|
ENDIF(READLINE_FOUND) |
| 950 |
ph10 |
1162 |
MESSAGE(STATUS " Support Valgrind .................: ${PCRE_SUPPORT_VALGRIND}") |
| 951 |
ph10 |
1221 |
MESSAGE(STATUS " Support coverage .................: ${PCRE_SUPPORT_COVERAGE}") |
| 952 |
ph10 |
939 |
|
| 953 |
ph10 |
407 |
IF(MINGW AND NOT PCRE_STATIC) |
| 954 |
ph10 |
413 |
MESSAGE(STATUS " Non-standard dll names (prefix) . : ${NON_STANDARD_LIB_PREFIX}") |
| 955 |
|
|
MESSAGE(STATUS " Non-standard dll names (suffix) . : ${NON_STANDARD_LIB_SUFFIX}") |
| 956 |
ph10 |
407 |
ENDIF(MINGW AND NOT PCRE_STATIC) |
| 957 |
|
|
MESSAGE(STATUS "") |
| 958 |
|
|
ENDIF(PCRE_SHOW_REPORT) |
| 959 |
ph10 |
303 |
|
| 960 |
ph10 |
137 |
# end CMakeLists.txt |