/[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 864 by zherczeg, Fri Jan 13 04:58:55 2012 UTC revision 1055 by chpe, Tue Oct 16 15:53:30 2012 UTC
# Line 54  Line 54 
54  # 2012-01-06 PH removed pcre_info.c and added pcre_string_utils.c  # 2012-01-06 PH removed pcre_info.c and added pcre_string_utils.c
55  # 2012-01-10 Zoltan Herczeg added libpcre16 support  # 2012-01-10 Zoltan Herczeg added libpcre16 support
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
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    
63  PROJECT(PCRE C CXX)  PROJECT(PCRE C CXX)
64    
# Line 67  SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_D Line 72  SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_D
72  FIND_PACKAGE( BZip2 )  FIND_PACKAGE( BZip2 )
73  FIND_PACKAGE( ZLIB )  FIND_PACKAGE( ZLIB )
74  FIND_PACKAGE( Readline )  FIND_PACKAGE( Readline )
75    FIND_PACKAGE( Editline )
76    
77  # Configuration checks  # Configuration checks
78    
# Line 108  OPTION(PCRE_BUILD_PCRE8 "Build 8 bit PCR Line 114  OPTION(PCRE_BUILD_PCRE8 "Build 8 bit PCR
114    
115  OPTION(PCRE_BUILD_PCRE16 "Build 16 bit PCRE library" OFF)  OPTION(PCRE_BUILD_PCRE16 "Build 16 bit PCRE library" OFF)
116    
117    OPTION(PCRE_BUILD_PCRE32 "Build 32 bit PCRE library" OFF)
118    
119  OPTION(PCRE_BUILD_PCRECPP "Build the PCRE C++ library (pcrecpp)." ON)  OPTION(PCRE_BUILD_PCRECPP "Build the PCRE C++ library (pcrecpp)." ON)
120    
121  SET(PCRE_EBCDIC OFF CACHE BOOL  SET(PCRE_EBCDIC OFF CACHE BOOL
122      "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.)")
123    
124    SET(PCRE_EBCDIC_NL25 OFF CACHE BOOL
125        "Use 0x25 as EBCDIC NL character instead of 0x15; implies EBCDIC.")
126    
127  SET(PCRE_LINK_SIZE "2" CACHE STRING  SET(PCRE_LINK_SIZE "2" CACHE STRING
128      "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.")
# Line 141  SET(PCRE_SUPPORT_PCREGREP_JIT ON CACHE B Line 152  SET(PCRE_SUPPORT_PCREGREP_JIT ON CACHE B
152      "Enable use of Just-in-time compiling in pcregrep.")      "Enable use of Just-in-time compiling in pcregrep.")
153    
154  SET(PCRE_SUPPORT_UTF OFF CACHE BOOL  SET(PCRE_SUPPORT_UTF OFF CACHE BOOL
155      "Enable support for the Unicode Transformation Format (UTF) encoding.")      "Enable support for Unicode Transformation Format (UTF-8/UTF-16/UTF-32) encoding.")
156    
157  SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF CACHE BOOL  SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF CACHE BOOL
158      "Enable support for Unicode properties. (If set, UTF-8 support will be enabled as well)")      "Enable support for Unicode properties (if set, UTF support will be enabled as well).")
   
 SET(PCRE_SUPPORT_UTF8 OFF CACHE BOOL  
     "Enable support for the Unicode UTF-8 encoding.")  
159    
160  SET(PCRE_SUPPORT_BSR_ANYCRLF OFF CACHE BOOL  SET(PCRE_SUPPORT_BSR_ANYCRLF OFF CACHE BOOL
161      "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")
# Line 182  IF(PCRE_SUPPORT_LIBZ) Line 190  IF(PCRE_SUPPORT_LIBZ)
190    INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})    INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
191  ENDIF(PCRE_SUPPORT_LIBZ)  ENDIF(PCRE_SUPPORT_LIBZ)
192    
193    # editline lib
194    IF(EDITLINE_FOUND)
195      OPTION (PCRE_SUPPORT_LIBEDIT  "Enable support for linking pcretest with libedit." OFF)
196    ENDIF(EDITLINE_FOUND)
197    IF(PCRE_SUPPORT_LIBEDIT)
198      INCLUDE_DIRECTORIES(${EDITLINE_INCLUDE_DIR})
199    ENDIF(PCRE_SUPPORT_LIBEDIT)
200    
201  # readline lib  # readline lib
202  IF(READLINE_FOUND)  IF(READLINE_FOUND)
203    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 218  IF(NOT BUILD_SHARED_LIBS) Line 234  IF(NOT BUILD_SHARED_LIBS)
234          SET(PCRE_STATIC 1)          SET(PCRE_STATIC 1)
235  ENDIF(NOT BUILD_SHARED_LIBS)  ENDIF(NOT BUILD_SHARED_LIBS)
236    
237  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)
238          MESSAGE(FATAL_ERROR "Either PCRE_BUILD_PCRE8 or PCRE_BUILD_PCRE16 must be enabled")          MESSAGE(FATAL_ERROR "Either PCRE_BUILD_PCRE8, PCRE_BUILD_PCRE16 or PCRE_BUILD_PCRE32 must be enabled")
239  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)
240    
241  IF(PCRE_BUILD_PCRE8)  IF(PCRE_BUILD_PCRE8)
242          SET(SUPPORT_PCRE8 1)          SET(SUPPORT_PCRE8 1)
# Line 230  IF(PCRE_BUILD_PCRE16) Line 246  IF(PCRE_BUILD_PCRE16)
246          SET(SUPPORT_PCRE16 1)          SET(SUPPORT_PCRE16 1)
247  ENDIF(PCRE_BUILD_PCRE16)  ENDIF(PCRE_BUILD_PCRE16)
248    
249    IF(PCRE_BUILD_PCRE32)
250            SET(SUPPORT_PCRE32 1)
251    ENDIF(PCRE_BUILD_PCRE32)
252    
253  IF(PCRE_BUILD_PCRECPP AND NOT PCRE_BUILD_PCRE8)  IF(PCRE_BUILD_PCRECPP AND NOT PCRE_BUILD_PCRE8)
254          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")
255          SET(PCRE_BUILD_PCRECPP OFF)          SET(PCRE_BUILD_PCRECPP OFF)
# Line 240  IF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUIL Line 260  IF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUIL
260          SET(PCRE_BUILD_PCREGREP OFF)          SET(PCRE_BUILD_PCREGREP OFF)
261  ENDIF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUILD_PCRE8)  ENDIF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUILD_PCRE8)
262    
263    IF(PCRE_SUPPORT_LIBREADLINE AND PCRE_SUPPORT_LIBEDIT)
264            MESSAGE(FATAL_ERROR "Only one of libreadline or libeditline can be specified")
265    ENDIF(PCRE_SUPPORT_LIBREADLINE AND PCRE_SUPPORT_LIBEDIT)
266    
267  IF(PCRE_SUPPORT_BSR_ANYCRLF)  IF(PCRE_SUPPORT_BSR_ANYCRLF)
268          SET(BSR_ANYCRLF 1)          SET(BSR_ANYCRLF 1)
269  ENDIF(PCRE_SUPPORT_BSR_ANYCRLF)  ENDIF(PCRE_SUPPORT_BSR_ANYCRLF)
270    
271  IF(PCRE_SUPPORT_UTF OR PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES)  IF(PCRE_SUPPORT_UTF OR PCRE_SUPPORT_UNICODE_PROPERTIES)
272          SET(SUPPORT_UTF 1)          SET(SUPPORT_UTF 1)
273          SET(PCRE_SUPPORT_UTF ON)          SET(PCRE_SUPPORT_UTF ON)
274  ENDIF(PCRE_SUPPORT_UTF OR PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES)  ENDIF(PCRE_SUPPORT_UTF OR PCRE_SUPPORT_UNICODE_PROPERTIES)
275    
276  IF(PCRE_SUPPORT_UNICODE_PROPERTIES)  IF(PCRE_SUPPORT_UNICODE_PROPERTIES)
277          SET(SUPPORT_UCP 1)          SET(SUPPORT_UCP 1)
# Line 272  IF(PCRE_SUPPORT_LIBREADLINE) Line 296  IF(PCRE_SUPPORT_LIBREADLINE)
296          SET(PCRETEST_LIBS ${READLINE_LIBRARY} ${NCURSES_LIBRARY})          SET(PCRETEST_LIBS ${READLINE_LIBRARY} ${NCURSES_LIBRARY})
297  ENDIF(PCRE_SUPPORT_LIBREADLINE)  ENDIF(PCRE_SUPPORT_LIBREADLINE)
298    
299    # libedit is a plug-compatible alternative to libreadline
300    
301    IF(PCRE_SUPPORT_LIBEDIT)
302            SET(SUPPORT_LIBEDIT 1)
303            SET(PCRETEST_LIBS ${EDITLINE_LIBRARY} ${NCURSES_LIBRARY})
304    ENDIF(PCRE_SUPPORT_LIBEDIT)
305    
306  IF(PCRE_SUPPORT_LIBZ)  IF(PCRE_SUPPORT_LIBZ)
307          SET(SUPPORT_LIBZ 1)          SET(SUPPORT_LIBZ 1)
308          SET(PCREGREP_LIBS ${PCREGREP_LIBS} ${ZLIB_LIBRARIES})          SET(PCREGREP_LIBS ${PCREGREP_LIBS} ${ZLIB_LIBRARIES})
# Line 306  ENDIF(NEWLINE STREQUAL "") Line 337  ENDIF(NEWLINE STREQUAL "")
337    
338  IF(PCRE_EBCDIC)  IF(PCRE_EBCDIC)
339          SET(EBCDIC 1)          SET(EBCDIC 1)
340    IF(PCRE_NEWLINE STREQUAL "LF")
341            SET(NEWLINE "21")
342    ENDIF(PCRE_NEWLINE STREQUAL "LF")
343    IF(PCRE_NEWLINE STREQUAL "CRLF")
344            SET(NEWLINE "3349")
345    ENDIF(PCRE_NEWLINE STREQUAL "CRLF")
346  ENDIF(PCRE_EBCDIC)  ENDIF(PCRE_EBCDIC)
347    
348    IF(PCRE_EBCDIC_NL25)
349            SET(EBCDIC 1)
350            SET(EBCDIC_NL25 1)
351    IF(PCRE_NEWLINE STREQUAL "LF")
352            SET(NEWLINE "37")
353    ENDIF(PCRE_NEWLINE STREQUAL "LF")
354    IF(PCRE_NEWLINE STREQUAL "CRLF")
355            SET(NEWLINE "3365")
356    ENDIF(PCRE_NEWLINE STREQUAL "CRLF")
357    ENDIF(PCRE_EBCDIC_NL25)
358    
359  IF(PCRE_NO_RECURSE)  IF(PCRE_NO_RECURSE)
360          SET(NO_RECURSE 1)          SET(NO_RECURSE 1)
361  ENDIF(PCRE_NO_RECURSE)  ENDIF(PCRE_NO_RECURSE)
# Line 317  CONFIGURE_FILE(config-cmake.h.in Line 365  CONFIGURE_FILE(config-cmake.h.in
365                 ${PROJECT_BINARY_DIR}/config.h                 ${PROJECT_BINARY_DIR}/config.h
366                 @ONLY)                 @ONLY)
367    
368  CONFIGURE_FILE(pcre.h.generic  # Parse version numbers and date out of configure.ac
369    
370    file(STRINGS ${PROJECT_SOURCE_DIR}/configure.ac
371      configure_lines
372      LIMIT_COUNT 50 # Read only the first 50 lines of the file
373    )
374    
375    set(SEARCHED_VARIABLES "pcre_major" "pcre_minor" "pcre_prerelease" "pcre_date")
376    foreach(configure_line ${configure_lines})
377        foreach(_substitution_variable ${SEARCHED_VARIABLES})
378            string(TOUPPER ${_substitution_variable} _substitution_variable_upper)
379            if (NOT ${_substitution_variable_upper})
380                string(REGEX MATCH "m4_define\\(${_substitution_variable}, \\[(.*)\\]" MACTHED_STRING ${configure_line})
381                if (CMAKE_MATCH_1)
382                    set(${_substitution_variable_upper} ${CMAKE_MATCH_1})
383                endif()
384            endif()
385        endforeach()
386    endforeach()
387    
388    CONFIGURE_FILE(pcre.h.in
389                 ${PROJECT_BINARY_DIR}/pcre.h                 ${PROJECT_BINARY_DIR}/pcre.h
390                 COPYONLY)                 @ONLY)
391    
392  # What about pcre-config and libpcre.pc?  # What about pcre-config and libpcre.pc?
393    
# Line 374  SET(PCRE_SOURCES Line 442  SET(PCRE_SOURCES
442    pcre_newline.c    pcre_newline.c
443    pcre_ord2utf8.c    pcre_ord2utf8.c
444    pcre_refcount.c    pcre_refcount.c
445    pcre_string_utils.c    pcre_string_utils.c
446    pcre_study.c    pcre_study.c
447    pcre_tables.c    pcre_tables.c
448    pcre_ucd.c    pcre_ucd.c
# Line 416  SET(PCRE16_SOURCES Line 484  SET(PCRE16_SOURCES
484  )  )
485  ENDIF(PCRE_BUILD_PCRE16)  ENDIF(PCRE_BUILD_PCRE16)
486    
487    IF(PCRE_BUILD_PCRE32)
488    SET(PCRE32_SOURCES
489      pcre32_byte_order.c
490      pcre32_chartables.c
491      pcre32_compile.c
492      pcre32_config.c
493      pcre32_dfa_exec.c
494      pcre32_exec.c
495      pcre32_fullinfo.c
496      pcre32_get.c
497      pcre32_globals.c
498      pcre32_jit_compile.c
499      pcre32_maketables.c
500      pcre32_newline.c
501      pcre32_ord2utf32.c
502      pcre32_refcount.c
503      pcre32_string_utils.c
504      pcre32_study.c
505      pcre32_tables.c
506      pcre32_ucd.c
507      pcre32_utf32_utils.c
508      pcre32_valid_utf32.c
509      pcre32_version.c
510      pcre32_xclass.c
511    )
512    ENDIF(PCRE_BUILD_PCRE32)
513    
514  IF(MINGW AND NOT PCRE_STATIC)  IF(MINGW AND NOT PCRE_STATIC)
515  IF (EXISTS ${PROJECT_SOURCE_DIR}/pcre.rc)  IF (EXISTS ${PROJECT_SOURCE_DIR}/pcre.rc)
516  ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/pcre.o  ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/pcre.o
# Line 514  ENDIF(MINGW AND NOT PCRE_STATIC) Line 609  ENDIF(MINGW AND NOT PCRE_STATIC)
609    
610  ENDIF(PCRE_BUILD_PCRE16)  ENDIF(PCRE_BUILD_PCRE16)
611    
612    IF(PCRE_BUILD_PCRE32)
613    ADD_LIBRARY(pcre32 ${PCRE_HEADERS} ${PCRE32_SOURCES} ${PROJECT_BINARY_DIR}/config.h)
614    SET(targets ${targets} pcre32)
615    
616    IF(MINGW AND NOT PCRE_STATIC)
617      IF(NON_STANDARD_LIB_PREFIX)
618        SET_TARGET_PROPERTIES(pcre32
619                            PROPERTIES PREFIX ""
620        )
621      ENDIF(NON_STANDARD_LIB_PREFIX)
622    
623      IF(NON_STANDARD_LIB_SUFFIX)
624        SET_TARGET_PROPERTIES(pcre32
625                            PROPERTIES SUFFIX "-0.dll"
626        )
627      ENDIF(NON_STANDARD_LIB_SUFFIX)
628    ENDIF(MINGW AND NOT PCRE_STATIC)
629    
630    ENDIF(PCRE_BUILD_PCRE32)
631    
632  # pcrecpp  # pcrecpp
633  IF(PCRE_BUILD_PCRECPP)  IF(PCRE_BUILD_PCRECPP)
634  ADD_LIBRARY(pcrecpp ${PCRECPP_HEADERS} ${PCRECPP_SOURCES})  ADD_LIBRARY(pcrecpp ${PCRECPP_HEADERS} ${PCRECPP_SOURCES})
# Line 564  IF(PCRE_BUILD_TESTS) Line 679  IF(PCRE_BUILD_TESTS)
679    IF(PCRE_BUILD_PCRE16)    IF(PCRE_BUILD_PCRE16)
680      LIST(APPEND PCRETEST_SOURCES pcre16_printint.c)      LIST(APPEND PCRETEST_SOURCES pcre16_printint.c)
681    ENDIF(PCRE_BUILD_PCRE16)    ENDIF(PCRE_BUILD_PCRE16)
682      IF(PCRE_BUILD_PCRE32)
683        LIST(APPEND PCRETEST_SOURCES pcre32_printint.c)
684      ENDIF(PCRE_BUILD_PCRE32)
685    
686    ADD_EXECUTABLE(pcretest ${PCRETEST_SOURCES})    ADD_EXECUTABLE(pcretest ${PCRETEST_SOURCES})
687    SET(targets ${targets} pcretest)    SET(targets ${targets} pcretest)
# Line 573  IF(PCRE_BUILD_TESTS) Line 691  IF(PCRE_BUILD_TESTS)
691    IF(PCRE_BUILD_PCRE16)    IF(PCRE_BUILD_PCRE16)
692      LIST(APPEND PCRETEST_LIBS pcre16)      LIST(APPEND PCRETEST_LIBS pcre16)
693    ENDIF(PCRE_BUILD_PCRE16)    ENDIF(PCRE_BUILD_PCRE16)
694      IF(PCRE_BUILD_PCRE32)
695        LIST(APPEND PCRETEST_LIBS pcre32)
696      ENDIF(PCRE_BUILD_PCRE32)
697    TARGET_LINK_LIBRARIES(pcretest ${PCRETEST_LIBS})    TARGET_LINK_LIBRARIES(pcretest ${PCRETEST_LIBS})
698    
699    IF(PCRE_SUPPORT_JIT)    IF(PCRE_SUPPORT_JIT)
# Line 585  IF(PCRE_BUILD_TESTS) Line 706  IF(PCRE_BUILD_TESTS)
706      IF(PCRE_BUILD_PCRE16)      IF(PCRE_BUILD_PCRE16)
707        LIST(APPEND PCRE_JIT_TEST_LIBS pcre16)        LIST(APPEND PCRE_JIT_TEST_LIBS pcre16)
708      ENDIF(PCRE_BUILD_PCRE16)      ENDIF(PCRE_BUILD_PCRE16)
709        IF(PCRE_BUILD_PCRE32)
710          LIST(APPEND PCRE_JIT_TEST_LIBS pcre32)
711        ENDIF(PCRE_BUILD_PCRE32)
712      TARGET_LINK_LIBRARIES(pcre_jit_test ${PCRE_JIT_TEST_LIBS})      TARGET_LINK_LIBRARIES(pcre_jit_test ${PCRE_JIT_TEST_LIBS})
713    ENDIF(PCRE_SUPPORT_JIT)    ENDIF(PCRE_SUPPORT_JIT)
714    
# Line 621  IF(PCRE_BUILD_TESTS) Line 745  IF(PCRE_BUILD_TESTS)
745    FILE(WRITE ${PROJECT_BINARY_DIR}/CTestCustom.ctest    FILE(WRITE ${PROJECT_BINARY_DIR}/CTestCustom.ctest
746    "# This is a generated file.    "# This is a generated file.
747  MESSAGE(\"When testing is complete, review test output in the  MESSAGE(\"When testing is complete, review test output in the
748  ${PROJECT_BINARY_DIR}/Testing/Temporary folder.\")  \\\"${PROJECT_BINARY_DIR}/Testing/Temporary\\\" folder.\")
749  MESSAGE(\"\")  MESSAGE(\" \")
750  ")  ")
751    
752    FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_test.sh    FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_test.sh
# Line 658  if test \"$?\" != \"0\"; then exit 1; fi Line 782  if test \"$?\" != \"0\"; then exit 1; fi
782    
783    IF(WIN32)    IF(WIN32)
784      # Provide environment for executing the bat file version of RunTest      # Provide environment for executing the bat file version of RunTest
785      string(REPLACE "/" "\\" winsrc "${PROJECT_SOURCE_DIR}")      FILE(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR} winsrc)
786        FILE(TO_NATIVE_PATH ${PROJECT_BINARY_DIR} winbin)
787        FILE(TO_NATIVE_PATH ${PCRETEST_EXE} winexe)
788    
789      FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_test.txt      FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_test.bat
790      "\@REM This is a generated file.      "\@REM This is a generated file.
791  \@Echo off  \@echo off
792  setlocal  setlocal
793  SET\ srcdir=\${srcdir}  SET srcdir=\"${winsrc}\"
794  SET\ pcretest=\${pcretest}  SET pcretest=\"${winexe}\"
795  call \"\${srcdir}\\RunTest.Bat\"  if not [%CMAKE_CONFIG_TYPE%]==[] SET pcretest=\"${winbin}\\%CMAKE_CONFIG_TYPE%\\pcretest.exe\"
796    call %srcdir%\\RunTest.Bat
797  if errorlevel 1 exit /b 1  if errorlevel 1 exit /b 1
798  echo RunTest.bat tests successfully completed  echo RunTest.bat tests successfully completed
799  ")  ")
800    
   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}\")  
 ")  
   
801    ADD_TEST(NAME pcre_test_bat    ADD_TEST(NAME pcre_test_bat
802    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)
803    SET_TESTS_PROPERTIES(pcre_test_bat PROPERTIES    SET_TESTS_PROPERTIES(pcre_test_bat PROPERTIES
804    PASS_REGULAR_EXPRESSION "RunTest\\.bat tests successfully completed")    PASS_REGULAR_EXPRESSION "RunTest\\.bat tests successfully completed")
805    
# Line 775  IF(PCRE_SHOW_REPORT) Line 886  IF(PCRE_SHOW_REPORT)
886    MESSAGE(STATUS "")    MESSAGE(STATUS "")
887    MESSAGE(STATUS "  Build 8 bit PCRE library ........ : ${PCRE_BUILD_PCRE8}")    MESSAGE(STATUS "  Build 8 bit PCRE library ........ : ${PCRE_BUILD_PCRE8}")
888    MESSAGE(STATUS "  Build 16 bit PCRE library ....... : ${PCRE_BUILD_PCRE16}")    MESSAGE(STATUS "  Build 16 bit PCRE library ....... : ${PCRE_BUILD_PCRE16}")
889      MESSAGE(STATUS "  Build 32 bit PCRE library ....... : ${PCRE_BUILD_PCRE32}")
890    MESSAGE(STATUS "  Build C++ library ............... : ${PCRE_BUILD_PCRECPP}")    MESSAGE(STATUS "  Build C++ library ............... : ${PCRE_BUILD_PCRECPP}")
891    MESSAGE(STATUS "  Enable JIT compiling support .... : ${PCRE_SUPPORT_JIT}")    MESSAGE(STATUS "  Enable JIT compiling support .... : ${PCRE_SUPPORT_JIT}")
892    MESSAGE(STATUS "  Enable UTF support .............. : ${PCRE_SUPPORT_UTF}")    MESSAGE(STATUS "  Enable UTF support .............. : ${PCRE_SUPPORT_UTF}")
# Line 782  IF(PCRE_SHOW_REPORT) Line 894  IF(PCRE_SHOW_REPORT)
894    MESSAGE(STATUS "  Newline char/sequence ........... : ${PCRE_NEWLINE}")    MESSAGE(STATUS "  Newline char/sequence ........... : ${PCRE_NEWLINE}")
895    MESSAGE(STATUS "  \\R matches only ANYCRLF ......... : ${PCRE_SUPPORT_BSR_ANYCRLF}")    MESSAGE(STATUS "  \\R matches only ANYCRLF ......... : ${PCRE_SUPPORT_BSR_ANYCRLF}")
896    MESSAGE(STATUS "  EBCDIC coding ................... : ${PCRE_EBCDIC}")    MESSAGE(STATUS "  EBCDIC coding ................... : ${PCRE_EBCDIC}")
897      MESSAGE(STATUS "  EBCDIC coding with NL=0x25 ...... : ${PCRE_EBCDIC_NL25}")
898    MESSAGE(STATUS "  Rebuild char tables ............. : ${PCRE_REBUILD_CHARTABLES}")    MESSAGE(STATUS "  Rebuild char tables ............. : ${PCRE_REBUILD_CHARTABLES}")
899    MESSAGE(STATUS "  No stack recursion .............. : ${PCRE_NO_RECURSE}")    MESSAGE(STATUS "  No stack recursion .............. : ${PCRE_NO_RECURSE}")
900    MESSAGE(STATUS "  POSIX mem threshold ............. : ${PCRE_POSIX_MALLOC_THRESHOLD}")    MESSAGE(STATUS "  POSIX mem threshold ............. : ${PCRE_POSIX_MALLOC_THRESHOLD}")
# Line 798  IF(PCRE_SHOW_REPORT) Line 911  IF(PCRE_SHOW_REPORT)
911    IF(ZLIB_FOUND)    IF(ZLIB_FOUND)
912      MESSAGE(STATUS "  Link pcregrep with libz ......... : ${PCRE_SUPPORT_LIBZ}")      MESSAGE(STATUS "  Link pcregrep with libz ......... : ${PCRE_SUPPORT_LIBZ}")
913    ELSE(ZLIB_FOUND)    ELSE(ZLIB_FOUND)
914      MESSAGE(STATUS "  Link pcregrep with libz ......... : None" )      MESSAGE(STATUS "  Link pcregrep with libz ......... : Library not found" )
915    ENDIF(ZLIB_FOUND)    ENDIF(ZLIB_FOUND)
916    IF(BZIP2_FOUND)    IF(BZIP2_FOUND)
917      MESSAGE(STATUS "  Link pcregrep with libbz2 ....... : ${PCRE_SUPPORT_LIBBZ2}")      MESSAGE(STATUS "  Link pcregrep with libbz2 ....... : ${PCRE_SUPPORT_LIBBZ2}")
918    ELSE(BZIP2_FOUND)    ELSE(BZIP2_FOUND)
919      MESSAGE(STATUS "  Link pcregrep with libbz2 ....... : None" )      MESSAGE(STATUS "  Link pcregrep with libbz2 ....... : Library not found" )
920    ENDIF(BZIP2_FOUND)    ENDIF(BZIP2_FOUND)
921    IF(NOT PCRE_SUPPORT_LIBREADLINE)    IF(EDITLINE_FOUND)
922      MESSAGE(STATUS "  Link pcretest with libreadline .. : None" )      MESSAGE(STATUS "  Link pcretest with libeditline .. : ${PCRE_SUPPORT_LIBEDIT}")
923    ELSE(NOT PCRE_SUPPORT_LIBREADLINE)    ELSE(EDITLINE_FOUND)
924        MESSAGE(STATUS "  Link pcretest with libeditline .. : Library not found" )
925      ENDIF(EDITLINE_FOUND)
926      IF(READLINE_FOUND)
927      MESSAGE(STATUS "  Link pcretest with libreadline .. : ${PCRE_SUPPORT_LIBREADLINE}")      MESSAGE(STATUS "  Link pcretest with libreadline .. : ${PCRE_SUPPORT_LIBREADLINE}")
928    ENDIF(NOT PCRE_SUPPORT_LIBREADLINE)    ELSE(READLINE_FOUND)
929        MESSAGE(STATUS "  Link pcretest with libreadline .. : Library not found" )
930      ENDIF(READLINE_FOUND)
931    
932    IF(MINGW AND NOT PCRE_STATIC)    IF(MINGW AND NOT PCRE_STATIC)
933      MESSAGE(STATUS "  Non-standard dll names (prefix) . : ${NON_STANDARD_LIB_PREFIX}")      MESSAGE(STATUS "  Non-standard dll names (prefix) . : ${NON_STANDARD_LIB_PREFIX}")
934      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.864  
changed lines
  Added in v.1055

  ViewVC Help
Powered by ViewVC 1.1.5