/[pcre]/code/trunk/CMakeLists.txt
ViewVC logotype

Contents of /code/trunk/CMakeLists.txt

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.5