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

Diff of /code/trunk/CMakeLists.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 886 by ph10, Tue Jan 17 14:25:07 2012 UTC revision 1404 by ph10, Tue Nov 19 15:36:57 2013 UTC
# Line 56  Line 56 
56  # 2012-01-13 Stephen Kelly added out of source build support  # 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  # 2012-01-17 PH applied Stephen Kelly's patch to parse the version data out
58  #            of the configure.ac file  #            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    
69  PROJECT(PCRE C CXX)  PROJECT(PCRE C CXX)
70    
# Line 69  SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_D Line 78  SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_D
78  FIND_PACKAGE( BZip2 )  FIND_PACKAGE( BZip2 )
79  FIND_PACKAGE( ZLIB )  FIND_PACKAGE( ZLIB )
80  FIND_PACKAGE( Readline )  FIND_PACKAGE( Readline )
81    FIND_PACKAGE( Editline )
82    
83  # Configuration checks  # Configuration checks
84    
# Line 110  OPTION(PCRE_BUILD_PCRE8 "Build 8 bit PCR Line 120  OPTION(PCRE_BUILD_PCRE8 "Build 8 bit PCR
120    
121  OPTION(PCRE_BUILD_PCRE16 "Build 16 bit PCRE library" OFF)  OPTION(PCRE_BUILD_PCRE16 "Build 16 bit PCRE library" OFF)
122    
123    OPTION(PCRE_BUILD_PCRE32 "Build 32 bit PCRE library" OFF)
124    
125  OPTION(PCRE_BUILD_PCRECPP "Build the PCRE C++ library (pcrecpp)." ON)  OPTION(PCRE_BUILD_PCRECPP "Build the PCRE C++ library (pcrecpp)." ON)
126    
127  SET(PCRE_EBCDIC OFF CACHE BOOL  SET(PCRE_EBCDIC OFF CACHE BOOL
128      "Use EBCDIC coding instead of ASCII. (This is rarely used outside of mainframe systems)")      "Use EBCDIC coding instead of ASCII. (This is rarely used outside of mainframe systems.)")
129    
130    SET(PCRE_EBCDIC_NL25 OFF CACHE BOOL
131        "Use 0x25 as EBCDIC NL character instead of 0x15; implies EBCDIC.")
132    
133  SET(PCRE_LINK_SIZE "2" CACHE STRING  SET(PCRE_LINK_SIZE "2" CACHE STRING
134      "Internal link size (2, 3 or 4 allowed). See LINK_SIZE in config.h.in for details.")      "Internal link size (2, 3 or 4 allowed). See LINK_SIZE in config.h.in for details.")
135    
136    SET(PCRE_PARENS_NEST_LIMIT "250" CACHE STRING
137        "Default nested parentheses limit. See PARENS_NEST_LIMIT in config.h.in for details.")
138    
139  SET(PCRE_MATCH_LIMIT "10000000" CACHE STRING  SET(PCRE_MATCH_LIMIT "10000000" CACHE STRING
140      "Default limit on internal looping. See MATCH_LIMIT in config.h.in for details.")      "Default limit on internal looping. See MATCH_LIMIT in config.h.in for details.")
141    
# Line 143  SET(PCRE_SUPPORT_PCREGREP_JIT ON CACHE B Line 161  SET(PCRE_SUPPORT_PCREGREP_JIT ON CACHE B
161      "Enable use of Just-in-time compiling in pcregrep.")      "Enable use of Just-in-time compiling in pcregrep.")
162    
163  SET(PCRE_SUPPORT_UTF OFF CACHE BOOL  SET(PCRE_SUPPORT_UTF OFF CACHE BOOL
164      "Enable support for Unicode Transformation Format (UTF-8 and/or UTF-16) encoding.")      "Enable support for Unicode Transformation Format (UTF-8/UTF-16/UTF-32) encoding.")
165    
166  SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF CACHE BOOL  SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF CACHE BOOL
167      "Enable support for Unicode properties (if set, UTF support will be enabled as well).")      "Enable support for Unicode properties (if set, UTF support will be enabled as well).")
# Line 151  SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF Line 169  SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF
169  SET(PCRE_SUPPORT_BSR_ANYCRLF OFF CACHE BOOL  SET(PCRE_SUPPORT_BSR_ANYCRLF OFF CACHE BOOL
170      "ON=Backslash-R matches only LF CR and CRLF, OFF=Backslash-R matches all Unicode Linebreaks")      "ON=Backslash-R matches only LF CR and CRLF, OFF=Backslash-R matches all Unicode Linebreaks")
171    
172    SET(PCRE_SUPPORT_VALGRIND OFF CACHE BOOL
173        "Enable Valgrind support.")
174    
175  OPTION(PCRE_SHOW_REPORT    "Show the final configuration report" ON)  OPTION(PCRE_SHOW_REPORT    "Show the final configuration report" ON)
176  OPTION(PCRE_BUILD_PCREGREP "Build pcregrep" ON)  OPTION(PCRE_BUILD_PCREGREP "Build pcregrep" ON)
177  OPTION(PCRE_BUILD_TESTS    "Build the tests" ON)  OPTION(PCRE_BUILD_TESTS    "Build the tests" ON)
# Line 181  IF(PCRE_SUPPORT_LIBZ) Line 202  IF(PCRE_SUPPORT_LIBZ)
202    INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})    INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
203  ENDIF(PCRE_SUPPORT_LIBZ)  ENDIF(PCRE_SUPPORT_LIBZ)
204    
205    # editline lib
206    IF(EDITLINE_FOUND)
207      OPTION (PCRE_SUPPORT_LIBEDIT  "Enable support for linking pcretest with libedit." OFF)
208    ENDIF(EDITLINE_FOUND)
209    IF(PCRE_SUPPORT_LIBEDIT)
210      INCLUDE_DIRECTORIES(${EDITLINE_INCLUDE_DIR})
211    ENDIF(PCRE_SUPPORT_LIBEDIT)
212    
213  # readline lib  # readline lib
214  IF(READLINE_FOUND)  IF(READLINE_FOUND)
215    OPTION (PCRE_SUPPORT_LIBREADLINE  "Enable support for linking pcretest with libreadline." ON)    OPTION (PCRE_SUPPORT_LIBREADLINE  "Enable support for linking pcretest with libreadline." ON)
# Line 217  IF(NOT BUILD_SHARED_LIBS) Line 246  IF(NOT BUILD_SHARED_LIBS)
246          SET(PCRE_STATIC 1)          SET(PCRE_STATIC 1)
247  ENDIF(NOT BUILD_SHARED_LIBS)  ENDIF(NOT BUILD_SHARED_LIBS)
248    
249  IF(NOT PCRE_BUILD_PCRE8 AND NOT PCRE_BUILD_PCRE16)  IF(NOT PCRE_BUILD_PCRE8 AND NOT PCRE_BUILD_PCRE16 AND NOT PCRE_BUILD_PCRE32)
250          MESSAGE(FATAL_ERROR "Either PCRE_BUILD_PCRE8 or PCRE_BUILD_PCRE16 must be enabled")          MESSAGE(FATAL_ERROR "At least one of PCRE_BUILD_PCRE8, PCRE_BUILD_PCRE16 or PCRE_BUILD_PCRE32 must be enabled")
251  ENDIF(NOT PCRE_BUILD_PCRE8 AND NOT PCRE_BUILD_PCRE16)  ENDIF(NOT PCRE_BUILD_PCRE8 AND NOT PCRE_BUILD_PCRE16 AND NOT PCRE_BUILD_PCRE32)
252    
253  IF(PCRE_BUILD_PCRE8)  IF(PCRE_BUILD_PCRE8)
254          SET(SUPPORT_PCRE8 1)          SET(SUPPORT_PCRE8 1)
# Line 229  IF(PCRE_BUILD_PCRE16) Line 258  IF(PCRE_BUILD_PCRE16)
258          SET(SUPPORT_PCRE16 1)          SET(SUPPORT_PCRE16 1)
259  ENDIF(PCRE_BUILD_PCRE16)  ENDIF(PCRE_BUILD_PCRE16)
260    
261    IF(PCRE_BUILD_PCRE32)
262            SET(SUPPORT_PCRE32 1)
263    ENDIF(PCRE_BUILD_PCRE32)
264    
265  IF(PCRE_BUILD_PCRECPP AND NOT PCRE_BUILD_PCRE8)  IF(PCRE_BUILD_PCRECPP AND NOT PCRE_BUILD_PCRE8)
266          MESSAGE(STATUS "** PCRE_BUILD_PCRE8 must be enabled for the C++ library support")          MESSAGE(STATUS "** PCRE_BUILD_PCRE8 must be enabled for the C++ library support")
267          SET(PCRE_BUILD_PCRECPP OFF)          SET(PCRE_BUILD_PCRECPP OFF)
# Line 239  IF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUIL Line 272  IF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUIL
272          SET(PCRE_BUILD_PCREGREP OFF)          SET(PCRE_BUILD_PCREGREP OFF)
273  ENDIF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUILD_PCRE8)  ENDIF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUILD_PCRE8)
274    
275    IF(PCRE_SUPPORT_LIBREADLINE AND PCRE_SUPPORT_LIBEDIT)
276            MESSAGE(FATAL_ERROR "Only one of libreadline or libeditline can be specified")
277    ENDIF(PCRE_SUPPORT_LIBREADLINE AND PCRE_SUPPORT_LIBEDIT)
278    
279  IF(PCRE_SUPPORT_BSR_ANYCRLF)  IF(PCRE_SUPPORT_BSR_ANYCRLF)
280          SET(BSR_ANYCRLF 1)          SET(BSR_ANYCRLF 1)
281  ENDIF(PCRE_SUPPORT_BSR_ANYCRLF)  ENDIF(PCRE_SUPPORT_BSR_ANYCRLF)
# Line 260  IF(PCRE_SUPPORT_PCREGREP_JIT) Line 297  IF(PCRE_SUPPORT_PCREGREP_JIT)
297          SET(SUPPORT_PCREGREP_JIT 1)          SET(SUPPORT_PCREGREP_JIT 1)
298  ENDIF(PCRE_SUPPORT_PCREGREP_JIT)  ENDIF(PCRE_SUPPORT_PCREGREP_JIT)
299    
300    IF(PCRE_SUPPORT_VALGRIND)
301            SET(SUPPORT_VALGRIND 1)
302    ENDIF(PCRE_SUPPORT_VALGRIND)
303    
304  # This next one used to contain  # This next one used to contain
305  #       SET(PCRETEST_LIBS ${READLINE_LIBRARY})  #       SET(PCRETEST_LIBS ${READLINE_LIBRARY})
306  # but I was advised to add the NCURSES test as well, along with  # but I was advised to add the NCURSES test as well, along with
# Line 271  IF(PCRE_SUPPORT_LIBREADLINE) Line 312  IF(PCRE_SUPPORT_LIBREADLINE)
312          SET(PCRETEST_LIBS ${READLINE_LIBRARY} ${NCURSES_LIBRARY})          SET(PCRETEST_LIBS ${READLINE_LIBRARY} ${NCURSES_LIBRARY})
313  ENDIF(PCRE_SUPPORT_LIBREADLINE)  ENDIF(PCRE_SUPPORT_LIBREADLINE)
314    
315    # libedit is a plug-compatible alternative to libreadline
316    
317    IF(PCRE_SUPPORT_LIBEDIT)
318            SET(SUPPORT_LIBEDIT 1)
319            SET(PCRETEST_LIBS ${EDITLINE_LIBRARY} ${NCURSES_LIBRARY})
320    ENDIF(PCRE_SUPPORT_LIBEDIT)
321    
322  IF(PCRE_SUPPORT_LIBZ)  IF(PCRE_SUPPORT_LIBZ)
323          SET(SUPPORT_LIBZ 1)          SET(SUPPORT_LIBZ 1)
324          SET(PCREGREP_LIBS ${PCREGREP_LIBS} ${ZLIB_LIBRARIES})          SET(PCREGREP_LIBS ${PCREGREP_LIBS} ${ZLIB_LIBRARIES})
# Line 305  ENDIF(NEWLINE STREQUAL "") Line 353  ENDIF(NEWLINE STREQUAL "")
353    
354  IF(PCRE_EBCDIC)  IF(PCRE_EBCDIC)
355          SET(EBCDIC 1)          SET(EBCDIC 1)
356    IF(PCRE_NEWLINE STREQUAL "LF")
357            SET(NEWLINE "21")
358    ENDIF(PCRE_NEWLINE STREQUAL "LF")
359    IF(PCRE_NEWLINE STREQUAL "CRLF")
360            SET(NEWLINE "3349")
361    ENDIF(PCRE_NEWLINE STREQUAL "CRLF")
362  ENDIF(PCRE_EBCDIC)  ENDIF(PCRE_EBCDIC)
363    
364    IF(PCRE_EBCDIC_NL25)
365            SET(EBCDIC 1)
366            SET(EBCDIC_NL25 1)
367    IF(PCRE_NEWLINE STREQUAL "LF")
368            SET(NEWLINE "37")
369    ENDIF(PCRE_NEWLINE STREQUAL "LF")
370    IF(PCRE_NEWLINE STREQUAL "CRLF")
371            SET(NEWLINE "3365")
372    ENDIF(PCRE_NEWLINE STREQUAL "CRLF")
373    ENDIF(PCRE_EBCDIC_NL25)
374    
375  IF(PCRE_NO_RECURSE)  IF(PCRE_NO_RECURSE)
376          SET(NO_RECURSE 1)          SET(NO_RECURSE 1)
377  ENDIF(PCRE_NO_RECURSE)  ENDIF(PCRE_NO_RECURSE)
# Line 393  SET(PCRE_SOURCES Line 458  SET(PCRE_SOURCES
458    pcre_newline.c    pcre_newline.c
459    pcre_ord2utf8.c    pcre_ord2utf8.c
460    pcre_refcount.c    pcre_refcount.c
461    pcre_string_utils.c    pcre_string_utils.c
462    pcre_study.c    pcre_study.c
463    pcre_tables.c    pcre_tables.c
464    pcre_ucd.c    pcre_ucd.c
# Line 435  SET(PCRE16_SOURCES Line 500  SET(PCRE16_SOURCES
500  )  )
501  ENDIF(PCRE_BUILD_PCRE16)  ENDIF(PCRE_BUILD_PCRE16)
502    
503    IF(PCRE_BUILD_PCRE32)
504    SET(PCRE32_SOURCES
505      pcre32_byte_order.c
506      pcre32_chartables.c
507      pcre32_compile.c
508      pcre32_config.c
509      pcre32_dfa_exec.c
510      pcre32_exec.c
511      pcre32_fullinfo.c
512      pcre32_get.c
513      pcre32_globals.c
514      pcre32_jit_compile.c
515      pcre32_maketables.c
516      pcre32_newline.c
517      pcre32_ord2utf32.c
518      pcre32_refcount.c
519      pcre32_string_utils.c
520      pcre32_study.c
521      pcre32_tables.c
522      pcre32_ucd.c
523      pcre32_utf32_utils.c
524      pcre32_valid_utf32.c
525      pcre32_version.c
526      pcre32_xclass.c
527    )
528    ENDIF(PCRE_BUILD_PCRE32)
529    
530  IF(MINGW AND NOT PCRE_STATIC)  IF(MINGW AND NOT PCRE_STATIC)
531  IF (EXISTS ${PROJECT_SOURCE_DIR}/pcre.rc)  IF (EXISTS ${PROJECT_SOURCE_DIR}/pcre.rc)
532  ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/pcre.o  ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/pcre.o
# Line 476  SET(PCRECPP_SOURCES Line 568  SET(PCRECPP_SOURCES
568  ADD_DEFINITIONS(-DHAVE_CONFIG_H)  ADD_DEFINITIONS(-DHAVE_CONFIG_H)
569    
570  IF(MSVC)  IF(MSVC)
571          ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)          ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS)
572  ENDIF(MSVC)  ENDIF(MSVC)
573    
574  SET(CMAKE_INCLUDE_CURRENT_DIR 1)  SET(CMAKE_INCLUDE_CURRENT_DIR 1)
# Line 533  ENDIF(MINGW AND NOT PCRE_STATIC) Line 625  ENDIF(MINGW AND NOT PCRE_STATIC)
625    
626  ENDIF(PCRE_BUILD_PCRE16)  ENDIF(PCRE_BUILD_PCRE16)
627    
628    IF(PCRE_BUILD_PCRE32)
629    ADD_LIBRARY(pcre32 ${PCRE_HEADERS} ${PCRE32_SOURCES} ${PROJECT_BINARY_DIR}/config.h)
630    SET(targets ${targets} pcre32)
631    
632    IF(MINGW AND NOT PCRE_STATIC)
633      IF(NON_STANDARD_LIB_PREFIX)
634        SET_TARGET_PROPERTIES(pcre32
635                            PROPERTIES PREFIX ""
636        )
637      ENDIF(NON_STANDARD_LIB_PREFIX)
638    
639      IF(NON_STANDARD_LIB_SUFFIX)
640        SET_TARGET_PROPERTIES(pcre32
641                            PROPERTIES SUFFIX "-0.dll"
642        )
643      ENDIF(NON_STANDARD_LIB_SUFFIX)
644    ENDIF(MINGW AND NOT PCRE_STATIC)
645    
646    ENDIF(PCRE_BUILD_PCRE32)
647    
648  # pcrecpp  # pcrecpp
649  IF(PCRE_BUILD_PCRECPP)  IF(PCRE_BUILD_PCRECPP)
650  ADD_LIBRARY(pcrecpp ${PCRECPP_HEADERS} ${PCRECPP_SOURCES})  ADD_LIBRARY(pcrecpp ${PCRECPP_HEADERS} ${PCRECPP_SOURCES})
# Line 583  IF(PCRE_BUILD_TESTS) Line 695  IF(PCRE_BUILD_TESTS)
695    IF(PCRE_BUILD_PCRE16)    IF(PCRE_BUILD_PCRE16)
696      LIST(APPEND PCRETEST_SOURCES pcre16_printint.c)      LIST(APPEND PCRETEST_SOURCES pcre16_printint.c)
697    ENDIF(PCRE_BUILD_PCRE16)    ENDIF(PCRE_BUILD_PCRE16)
698      IF(PCRE_BUILD_PCRE32)
699        LIST(APPEND PCRETEST_SOURCES pcre32_printint.c)
700      ENDIF(PCRE_BUILD_PCRE32)
701    
702    ADD_EXECUTABLE(pcretest ${PCRETEST_SOURCES})    ADD_EXECUTABLE(pcretest ${PCRETEST_SOURCES})
703    SET(targets ${targets} pcretest)    SET(targets ${targets} pcretest)
# Line 592  IF(PCRE_BUILD_TESTS) Line 707  IF(PCRE_BUILD_TESTS)
707    IF(PCRE_BUILD_PCRE16)    IF(PCRE_BUILD_PCRE16)
708      LIST(APPEND PCRETEST_LIBS pcre16)      LIST(APPEND PCRETEST_LIBS pcre16)
709    ENDIF(PCRE_BUILD_PCRE16)    ENDIF(PCRE_BUILD_PCRE16)
710      IF(PCRE_BUILD_PCRE32)
711        LIST(APPEND PCRETEST_LIBS pcre32)
712      ENDIF(PCRE_BUILD_PCRE32)
713    TARGET_LINK_LIBRARIES(pcretest ${PCRETEST_LIBS})    TARGET_LINK_LIBRARIES(pcretest ${PCRETEST_LIBS})
714    
715    IF(PCRE_SUPPORT_JIT)    IF(PCRE_SUPPORT_JIT)
# Line 604  IF(PCRE_BUILD_TESTS) Line 722  IF(PCRE_BUILD_TESTS)
722      IF(PCRE_BUILD_PCRE16)      IF(PCRE_BUILD_PCRE16)
723        LIST(APPEND PCRE_JIT_TEST_LIBS pcre16)        LIST(APPEND PCRE_JIT_TEST_LIBS pcre16)
724      ENDIF(PCRE_BUILD_PCRE16)      ENDIF(PCRE_BUILD_PCRE16)
725        IF(PCRE_BUILD_PCRE32)
726          LIST(APPEND PCRE_JIT_TEST_LIBS pcre32)
727        ENDIF(PCRE_BUILD_PCRE32)
728      TARGET_LINK_LIBRARIES(pcre_jit_test ${PCRE_JIT_TEST_LIBS})      TARGET_LINK_LIBRARIES(pcre_jit_test ${PCRE_JIT_TEST_LIBS})
729    ENDIF(PCRE_SUPPORT_JIT)    ENDIF(PCRE_SUPPORT_JIT)
730    
# Line 640  IF(PCRE_BUILD_TESTS) Line 761  IF(PCRE_BUILD_TESTS)
761    FILE(WRITE ${PROJECT_BINARY_DIR}/CTestCustom.ctest    FILE(WRITE ${PROJECT_BINARY_DIR}/CTestCustom.ctest
762    "# This is a generated file.    "# This is a generated file.
763  MESSAGE(\"When testing is complete, review test output in the  MESSAGE(\"When testing is complete, review test output in the
764  ${PROJECT_BINARY_DIR}/Testing/Temporary folder.\")  \\\"${PROJECT_BINARY_DIR}/Testing/Temporary\\\" folder.\")
765  MESSAGE(\"\")  MESSAGE(\" \")
766  ")  ")
767    
768    FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_test.sh    FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_test.sh
# Line 649  MESSAGE(\"\") Line 770  MESSAGE(\"\")
770  # This is a generated file.  # This is a generated file.
771  srcdir=${PROJECT_SOURCE_DIR}  srcdir=${PROJECT_SOURCE_DIR}
772  pcretest=${PCRETEST_EXE}  pcretest=${PCRETEST_EXE}
773  source ${PROJECT_SOURCE_DIR}/RunTest  . ${PROJECT_SOURCE_DIR}/RunTest
774  if test \"$?\" != \"0\"; then exit 1; fi  if test \"$?\" != \"0\"; then exit 1; fi
775  # End  # End
776  ")  ")
# Line 665  if test \"$?\" != \"0\"; then exit 1; fi Line 786  if test \"$?\" != \"0\"; then exit 1; fi
786  srcdir=${PROJECT_SOURCE_DIR}  srcdir=${PROJECT_SOURCE_DIR}
787  pcregrep=${PCREGREP_EXE}  pcregrep=${PCREGREP_EXE}
788  pcretest=${PCRETEST_EXE}  pcretest=${PCRETEST_EXE}
789  source ${PROJECT_SOURCE_DIR}/RunGrepTest  . ${PROJECT_SOURCE_DIR}/RunGrepTest
790  if test \"$?\" != \"0\"; then exit 1; fi  if test \"$?\" != \"0\"; then exit 1; fi
791  # End  # End
792  ")  ")
# Line 677  if test \"$?\" != \"0\"; then exit 1; fi Line 798  if test \"$?\" != \"0\"; then exit 1; fi
798    
799    IF(WIN32)    IF(WIN32)
800      # Provide environment for executing the bat file version of RunTest      # Provide environment for executing the bat file version of RunTest
801      string(REPLACE "/" "\\" winsrc "${PROJECT_SOURCE_DIR}")      FILE(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR} winsrc)
802        FILE(TO_NATIVE_PATH ${PROJECT_BINARY_DIR} winbin)
803        FILE(TO_NATIVE_PATH ${PCRETEST_EXE} winexe)
804    
805      FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_test.txt      FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_test.bat
806      "\@REM This is a generated file.      "\@REM This is a generated file.
807  \@Echo off  \@echo off
808  setlocal  setlocal
809  SET\ srcdir=\${srcdir}  SET srcdir=\"${winsrc}\"
810  SET\ pcretest=\${pcretest}  SET pcretest=\"${winexe}\"
811  call \"\${srcdir}\\RunTest.Bat\"  if not [%CMAKE_CONFIG_TYPE%]==[] SET pcretest=\"${winbin}\\%CMAKE_CONFIG_TYPE%\\pcretest.exe\"
812    call %srcdir%\\RunTest.Bat
813  if errorlevel 1 exit /b 1  if errorlevel 1 exit /b 1
814  echo RunTest.bat tests successfully completed  echo RunTest.bat tests successfully completed
815  ")  ")
816    
   FILE(WRITE ${PROJECT_BINARY_DIR}/BatDriver.cmake  
   "# This is a generated file.  
 # this script is run with arguments via the cmake command in add_test(NAME pcre_test_bat)  
 # BatDriver feeds the actual location of pcretest.exe  
 FILE(TO_NATIVE_PATH \${pcretestx} pcretest)  
 FILE(TO_NATIVE_PATH \${srcdirx} srcdir)  
 configure_file(\"\${bindirx}/pcre_test.txt\" \"\${bindirx}/pcre_test.bat\")  
 # MESSAGE(\"cmake\ variable\ pcretest\ is\ \${pcretest}\")  
 # STRING(REPLACE \" \" \"\\ \" bindir \${bindirx})  
 MESSAGE(\"COMMAND pcre_test.bat \")  
 EXECUTE_PROCESS(COMMAND pcre_test.bat  
 WORKING_DIRECTORY .  
 OUTPUT_VARIABLE batoutput)  
 MESSAGE(\"OUTPUT: \${batoutput}\")  
 ")  
   
817    ADD_TEST(NAME pcre_test_bat    ADD_TEST(NAME pcre_test_bat
818    COMMAND ${CMAKE_COMMAND} -D bindirx=${PROJECT_BINARY_DIR} -D srcdirx=${PROJECT_SOURCE_DIR} -D pcretestx=$<TARGET_FILE:pcretest> -P "${PROJECT_BINARY_DIR}/BatDriver.cmake")    COMMAND pcre_test.bat)
819    SET_TESTS_PROPERTIES(pcre_test_bat PROPERTIES    SET_TESTS_PROPERTIES(pcre_test_bat PROPERTIES
820    PASS_REGULAR_EXPRESSION "RunTest\\.bat tests successfully completed")    PASS_REGULAR_EXPRESSION "RunTest\\.bat tests successfully completed")
821    
# Line 794  IF(PCRE_SHOW_REPORT) Line 902  IF(PCRE_SHOW_REPORT)
902    MESSAGE(STATUS "")    MESSAGE(STATUS "")
903    MESSAGE(STATUS "  Build 8 bit PCRE library ........ : ${PCRE_BUILD_PCRE8}")    MESSAGE(STATUS "  Build 8 bit PCRE library ........ : ${PCRE_BUILD_PCRE8}")
904    MESSAGE(STATUS "  Build 16 bit PCRE library ....... : ${PCRE_BUILD_PCRE16}")    MESSAGE(STATUS "  Build 16 bit PCRE library ....... : ${PCRE_BUILD_PCRE16}")
905      MESSAGE(STATUS "  Build 32 bit PCRE library ....... : ${PCRE_BUILD_PCRE32}")
906    MESSAGE(STATUS "  Build C++ library ............... : ${PCRE_BUILD_PCRECPP}")    MESSAGE(STATUS "  Build C++ library ............... : ${PCRE_BUILD_PCRECPP}")
907    MESSAGE(STATUS "  Enable JIT compiling support .... : ${PCRE_SUPPORT_JIT}")    MESSAGE(STATUS "  Enable JIT compiling support .... : ${PCRE_SUPPORT_JIT}")
908    MESSAGE(STATUS "  Enable UTF support .............. : ${PCRE_SUPPORT_UTF}")    MESSAGE(STATUS "  Enable UTF support .............. : ${PCRE_SUPPORT_UTF}")
# Line 801  IF(PCRE_SHOW_REPORT) Line 910  IF(PCRE_SHOW_REPORT)
910    MESSAGE(STATUS "  Newline char/sequence ........... : ${PCRE_NEWLINE}")    MESSAGE(STATUS "  Newline char/sequence ........... : ${PCRE_NEWLINE}")
911    MESSAGE(STATUS "  \\R matches only ANYCRLF ......... : ${PCRE_SUPPORT_BSR_ANYCRLF}")    MESSAGE(STATUS "  \\R matches only ANYCRLF ......... : ${PCRE_SUPPORT_BSR_ANYCRLF}")
912    MESSAGE(STATUS "  EBCDIC coding ................... : ${PCRE_EBCDIC}")    MESSAGE(STATUS "  EBCDIC coding ................... : ${PCRE_EBCDIC}")
913      MESSAGE(STATUS "  EBCDIC coding with NL=0x25 ...... : ${PCRE_EBCDIC_NL25}")
914    MESSAGE(STATUS "  Rebuild char tables ............. : ${PCRE_REBUILD_CHARTABLES}")    MESSAGE(STATUS "  Rebuild char tables ............. : ${PCRE_REBUILD_CHARTABLES}")
915    MESSAGE(STATUS "  No stack recursion .............. : ${PCRE_NO_RECURSE}")    MESSAGE(STATUS "  No stack recursion .............. : ${PCRE_NO_RECURSE}")
916    MESSAGE(STATUS "  POSIX mem threshold ............. : ${PCRE_POSIX_MALLOC_THRESHOLD}")    MESSAGE(STATUS "  POSIX mem threshold ............. : ${PCRE_POSIX_MALLOC_THRESHOLD}")
917    MESSAGE(STATUS "  Internal link size .............. : ${PCRE_LINK_SIZE}")    MESSAGE(STATUS "  Internal link size .............. : ${PCRE_LINK_SIZE}")
918      MESSAGE(STATUS "  Parentheses nest limit .......... : ${PCRE_PARENS_NEST_LIMIT}")
919    MESSAGE(STATUS "  Match limit ..................... : ${PCRE_MATCH_LIMIT}")    MESSAGE(STATUS "  Match limit ..................... : ${PCRE_MATCH_LIMIT}")
920    MESSAGE(STATUS "  Match limit recursion ........... : ${PCRE_MATCH_LIMIT_RECURSION}")    MESSAGE(STATUS "  Match limit recursion ........... : ${PCRE_MATCH_LIMIT_RECURSION}")
921    MESSAGE(STATUS "  Build shared libs ............... : ${BUILD_SHARED_LIBS}")    MESSAGE(STATUS "  Build shared libs ............... : ${BUILD_SHARED_LIBS}")
# Line 817  IF(PCRE_SHOW_REPORT) Line 928  IF(PCRE_SHOW_REPORT)
928    IF(ZLIB_FOUND)    IF(ZLIB_FOUND)
929      MESSAGE(STATUS "  Link pcregrep with libz ......... : ${PCRE_SUPPORT_LIBZ}")      MESSAGE(STATUS "  Link pcregrep with libz ......... : ${PCRE_SUPPORT_LIBZ}")
930    ELSE(ZLIB_FOUND)    ELSE(ZLIB_FOUND)
931      MESSAGE(STATUS "  Link pcregrep with libz ......... : None" )      MESSAGE(STATUS "  Link pcregrep with libz ......... : Library not found" )
932    ENDIF(ZLIB_FOUND)    ENDIF(ZLIB_FOUND)
933    IF(BZIP2_FOUND)    IF(BZIP2_FOUND)
934      MESSAGE(STATUS "  Link pcregrep with libbz2 ....... : ${PCRE_SUPPORT_LIBBZ2}")      MESSAGE(STATUS "  Link pcregrep with libbz2 ....... : ${PCRE_SUPPORT_LIBBZ2}")
935    ELSE(BZIP2_FOUND)    ELSE(BZIP2_FOUND)
936      MESSAGE(STATUS "  Link pcregrep with libbz2 ....... : None" )      MESSAGE(STATUS "  Link pcregrep with libbz2 ....... : Library not found" )
937    ENDIF(BZIP2_FOUND)    ENDIF(BZIP2_FOUND)
938    IF(NOT PCRE_SUPPORT_LIBREADLINE)    IF(EDITLINE_FOUND)
939      MESSAGE(STATUS "  Link pcretest with libreadline .. : None" )      MESSAGE(STATUS "  Link pcretest with libeditline .. : ${PCRE_SUPPORT_LIBEDIT}")
940    ELSE(NOT PCRE_SUPPORT_LIBREADLINE)    ELSE(EDITLINE_FOUND)
941        MESSAGE(STATUS "  Link pcretest with libeditline .. : Library not found" )
942      ENDIF(EDITLINE_FOUND)
943      IF(READLINE_FOUND)
944      MESSAGE(STATUS "  Link pcretest with libreadline .. : ${PCRE_SUPPORT_LIBREADLINE}")      MESSAGE(STATUS "  Link pcretest with libreadline .. : ${PCRE_SUPPORT_LIBREADLINE}")
945    ENDIF(NOT PCRE_SUPPORT_LIBREADLINE)    ELSE(READLINE_FOUND)
946        MESSAGE(STATUS "  Link pcretest with libreadline .. : Library not found" )
947      ENDIF(READLINE_FOUND)
948      MESSAGE(STATUS "  Support Valgrind .................: ${PCRE_SUPPORT_VALGRIND}")
949      MESSAGE(STATUS "  Support coverage .................: ${PCRE_SUPPORT_COVERAGE}")
950    
951    IF(MINGW AND NOT PCRE_STATIC)    IF(MINGW AND NOT PCRE_STATIC)
952      MESSAGE(STATUS "  Non-standard dll names (prefix) . : ${NON_STANDARD_LIB_PREFIX}")      MESSAGE(STATUS "  Non-standard dll names (prefix) . : ${NON_STANDARD_LIB_PREFIX}")
953      MESSAGE(STATUS "  Non-standard dll names (suffix) . : ${NON_STANDARD_LIB_SUFFIX}")      MESSAGE(STATUS "  Non-standard dll names (suffix) . : ${NON_STANDARD_LIB_SUFFIX}")

Legend:
Removed from v.886  
changed lines
  Added in v.1404

  ViewVC Help
Powered by ViewVC 1.1.5