/[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 853 by ph10, Fri Jan 6 13:48:54 2012 UTC revision 863 by zherczeg, Thu Jan 12 19:19:56 2012 UTC
# Line 52  Line 52 
52  #            RunTest.bat in Win32 (for effortless testing with "make test")  #            RunTest.bat in Win32 (for effortless testing with "make test")
53  # 2011-10-04 Sheri Increased minimum required cmake version  # 2011-10-04 Sheri Increased minimum required cmake version
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
56    
57  PROJECT(PCRE C CXX)  PROJECT(PCRE C CXX)
58    
# Line 102  CHECK_TYPE_SIZE("unsigned long long" Line 103  CHECK_TYPE_SIZE("unsigned long long"
103  SET(BUILD_SHARED_LIBS OFF CACHE BOOL  SET(BUILD_SHARED_LIBS OFF CACHE BOOL
104      "Build shared libraries instead of static ones.")      "Build shared libraries instead of static ones.")
105    
106    OPTION(PCRE_BUILD_PCRE8 "Build 8 bit PCRE library" ON)
107    
108    OPTION(PCRE_BUILD_PCRE16 "Build 16 bit PCRE library" OFF)
109    
110  OPTION(PCRE_BUILD_PCRECPP "Build the PCRE C++ library (pcrecpp)." ON)  OPTION(PCRE_BUILD_PCRECPP "Build the PCRE C++ library (pcrecpp)." ON)
111    
112  SET(PCRE_EBCDIC OFF CACHE BOOL  SET(PCRE_EBCDIC OFF CACHE BOOL
# Line 134  SET(PCRE_SUPPORT_JIT OFF CACHE BOOL Line 139  SET(PCRE_SUPPORT_JIT OFF CACHE BOOL
139  SET(PCRE_SUPPORT_PCREGREP_JIT ON CACHE BOOL  SET(PCRE_SUPPORT_PCREGREP_JIT ON CACHE BOOL
140      "Enable use of Just-in-time compiling in pcregrep.")      "Enable use of Just-in-time compiling in pcregrep.")
141    
142    SET(PCRE_SUPPORT_UTF OFF CACHE BOOL
143        "Enable support for the Unicode Transformation Format (UTF) encoding.")
144    
145  SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF CACHE BOOL  SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF CACHE BOOL
146      "Enable support for Unicode properties. (If set, UTF-8 support will be enabled as well)")      "Enable support for Unicode properties. (If set, UTF-8 support will be enabled as well)")
147    
# Line 147  OPTION(PCRE_SHOW_REPORT "Show the fin Line 155  OPTION(PCRE_SHOW_REPORT "Show the fin
155  OPTION(PCRE_BUILD_PCREGREP "Build pcregrep" ON)  OPTION(PCRE_BUILD_PCREGREP "Build pcregrep" ON)
156  OPTION(PCRE_BUILD_TESTS    "Build the tests" ON)  OPTION(PCRE_BUILD_TESTS    "Build the tests" ON)
157    
 IF (PCRE_BUILD_TESTS)  
   IF (NOT PCRE_BUILD_PCREGREP)  
     MESSAGE(STATUS "** Building tests requires pcregrep: PCRE_BUILD_PCREGREP forced ON")  
     SET(PCRE_BUILD_PCREGREP ON)  
   ENDIF(NOT PCRE_BUILD_PCREGREP)  
 ENDIF(PCRE_BUILD_TESTS)  
   
158  IF (MINGW)  IF (MINGW)
159    OPTION(NON_STANDARD_LIB_PREFIX    OPTION(NON_STANDARD_LIB_PREFIX
160           "ON=Shared libraries built in mingw will be named pcre.dll, etc., instead of libpcre.dll, etc."           "ON=Shared libraries built in mingw will be named pcre.dll, etc., instead of libpcre.dll, etc."
# Line 216  IF(NOT BUILD_SHARED_LIBS) Line 217  IF(NOT BUILD_SHARED_LIBS)
217          SET(PCRE_STATIC 1)          SET(PCRE_STATIC 1)
218  ENDIF(NOT BUILD_SHARED_LIBS)  ENDIF(NOT BUILD_SHARED_LIBS)
219    
220    IF(NOT PCRE_BUILD_PCRE8 AND NOT PCRE_BUILD_PCRE16)
221            MESSAGE(FATAL_ERROR "Either PCRE_BUILD_PCRE8 or PCRE_BUILD_PCRE16 must be enabled")
222    ENDIF(NOT PCRE_BUILD_PCRE8 AND NOT PCRE_BUILD_PCRE16)
223    
224    IF(PCRE_BUILD_PCRE8)
225            SET(SUPPORT_PCRE8 1)
226    ENDIF(PCRE_BUILD_PCRE8)
227    
228    IF(PCRE_BUILD_PCRE16)
229            SET(SUPPORT_PCRE16 1)
230    ENDIF(PCRE_BUILD_PCRE16)
231    
232    IF(PCRE_BUILD_PCRECPP AND NOT PCRE_BUILD_PCRE8)
233            MESSAGE(STATUS "** PCRE_BUILD_PCRE8 must be enabled for the C++ library support")
234            SET(PCRE_BUILD_PCRECPP OFF)
235    ENDIF(PCRE_BUILD_PCRECPP AND NOT PCRE_BUILD_PCRE8)
236    
237    IF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUILD_PCRE8)
238            MESSAGE(STATUS "** PCRE_BUILD_PCRE8 must be enabled for the pcregrep program")
239            SET(PCRE_BUILD_PCREGREP OFF)
240    ENDIF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUILD_PCRE8)
241    
242  IF(PCRE_SUPPORT_BSR_ANYCRLF)  IF(PCRE_SUPPORT_BSR_ANYCRLF)
243          SET(BSR_ANYCRLF 1)          SET(BSR_ANYCRLF 1)
244  ENDIF(PCRE_SUPPORT_BSR_ANYCRLF)  ENDIF(PCRE_SUPPORT_BSR_ANYCRLF)
245    
246  IF(PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES)  IF(PCRE_SUPPORT_UTF OR PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES)
247          SET(SUPPORT_UTF8 1)          SET(SUPPORT_UTF 1)
248  ENDIF(PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES)          SET(PCRE_SUPPORT_UTF ON)
249    ENDIF(PCRE_SUPPORT_UTF OR PCRE_SUPPORT_UTF8 OR PCRE_SUPPORT_UNICODE_PROPERTIES)
250    
251  IF(PCRE_SUPPORT_UNICODE_PROPERTIES)  IF(PCRE_SUPPORT_UNICODE_PROPERTIES)
252          SET(SUPPORT_UCP 1)          SET(SUPPORT_UCP 1)
# Line 333  ENDIF(PCRE_REBUILD_CHARTABLES) Line 357  ENDIF(PCRE_REBUILD_CHARTABLES)
357    
358  SET(PCRE_HEADERS ${PROJECT_BINARY_DIR}/pcre.h)  SET(PCRE_HEADERS ${PROJECT_BINARY_DIR}/pcre.h)
359    
360    IF(PCRE_BUILD_PCRE8)
361  SET(PCRE_SOURCES  SET(PCRE_SOURCES
362    ${PROJECT_BINARY_DIR}/pcre_byte_order.c    ${PROJECT_BINARY_DIR}/pcre_byte_order.c
363    pcre_chartables.c    pcre_chartables.c
# Line 357  SET(PCRE_SOURCES Line 382  SET(PCRE_SOURCES
382    pcre_xclass.c    pcre_xclass.c
383  )  )
384    
   
385  SET(PCREPOSIX_HEADERS pcreposix.h)  SET(PCREPOSIX_HEADERS pcreposix.h)
386    
387  SET(PCREPOSIX_SOURCES pcreposix.c)  SET(PCREPOSIX_SOURCES pcreposix.c)
388    
389    ENDIF(PCRE_BUILD_PCRE8)
390    
391    IF(PCRE_BUILD_PCRE16)
392    SET(PCRE16_SOURCES
393      ${PROJECT_BINARY_DIR}/pcre16_byte_order.c
394      pcre16_byte_order.c
395      pcre16_chartables.c
396      pcre16_compile.c
397      pcre16_config.c
398      pcre16_dfa_exec.c
399      pcre16_exec.c
400      pcre16_fullinfo.c
401      pcre16_get.c
402      pcre16_globals.c
403      pcre16_jit_compile.c
404      pcre16_maketables.c
405      pcre16_newline.c
406      pcre16_ord2utf16.c
407      pcre16_refcount.c
408      pcre16_string_utils.c
409      pcre16_study.c
410      pcre16_tables.c
411      pcre16_ucd.c
412      pcre16_utf16_utils.c
413      pcre16_valid_utf16.c
414      pcre16_version.c
415      pcre16_xclass.c
416    )
417    ENDIF(PCRE_BUILD_PCRE16)
418    
419  IF(MINGW AND NOT PCRE_STATIC)  IF(MINGW AND NOT PCRE_STATIC)
420  IF (EXISTS ${PROJECT_SOURCE_DIR}/pcre.rc)  IF (EXISTS ${PROJECT_SOURCE_DIR}/pcre.rc)
421  ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/pcre.o  ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/pcre.o
# Line 417  SET(targets) Line 471  SET(targets)
471    
472  # Libraries  # Libraries
473  # pcre  # pcre
474    IF(PCRE_BUILD_PCRE8)
475  ADD_LIBRARY(pcre ${PCRE_HEADERS} ${PCRE_SOURCES} ${PROJECT_BINARY_DIR}/config.h)  ADD_LIBRARY(pcre ${PCRE_HEADERS} ${PCRE_SOURCES} ${PROJECT_BINARY_DIR}/config.h)
476  SET(targets ${targets} pcre)  SET(targets ${targets} pcre)
477  ADD_LIBRARY(pcreposix ${PCREPOSIX_HEADERS} ${PCREPOSIX_SOURCES})  ADD_LIBRARY(pcreposix ${PCREPOSIX_HEADERS} ${PCREPOSIX_SOURCES})
478  SET(targets ${targets} pcreposix)  SET(targets ${targets} pcreposix)
479  TARGET_LINK_LIBRARIES(pcreposix pcre)  TARGET_LINK_LIBRARIES(pcreposix pcre)
480    
481  IF(MINGW AND NOT PCRE_STATIC)  IF(MINGW AND NOT PCRE_STATIC)
482    IF(NON_STANDARD_LIB_PREFIX)    IF(NON_STANDARD_LIB_PREFIX)
483      SET_TARGET_PROPERTIES(pcre pcreposix      SET_TARGET_PROPERTIES(pcre pcreposix
# Line 436  IF(MINGW AND NOT PCRE_STATIC) Line 492  IF(MINGW AND NOT PCRE_STATIC)
492    ENDIF(NON_STANDARD_LIB_SUFFIX)    ENDIF(NON_STANDARD_LIB_SUFFIX)
493  ENDIF(MINGW AND NOT PCRE_STATIC)  ENDIF(MINGW AND NOT PCRE_STATIC)
494    
495    ENDIF(PCRE_BUILD_PCRE8)
496    
497    IF(PCRE_BUILD_PCRE16)
498    ADD_LIBRARY(pcre16 ${PCRE_HEADERS} ${PCRE16_SOURCES} ${PROJECT_BINARY_DIR}/config.h)
499    SET(targets ${targets} pcre16)
500    
501    IF(MINGW AND NOT PCRE_STATIC)
502      IF(NON_STANDARD_LIB_PREFIX)
503        SET_TARGET_PROPERTIES(pcre16
504                            PROPERTIES PREFIX ""
505        )
506      ENDIF(NON_STANDARD_LIB_PREFIX)
507    
508      IF(NON_STANDARD_LIB_SUFFIX)
509        SET_TARGET_PROPERTIES(pcre16
510                            PROPERTIES SUFFIX "-0.dll"
511        )
512      ENDIF(NON_STANDARD_LIB_SUFFIX)
513    ENDIF(MINGW AND NOT PCRE_STATIC)
514    
515    ENDIF(PCRE_BUILD_PCRE16)
516    
517  # pcrecpp  # pcrecpp
518  IF(PCRE_BUILD_PCRECPP)  IF(PCRE_BUILD_PCRECPP)
519    ADD_LIBRARY(pcrecpp ${PCRECPP_HEADERS} ${PCRECPP_SOURCES})  ADD_LIBRARY(pcrecpp ${PCRECPP_HEADERS} ${PCRECPP_SOURCES})
520  SET(targets ${targets} pcrecpp)  SET(targets ${targets} pcrecpp)
521    TARGET_LINK_LIBRARIES(pcrecpp pcre)  TARGET_LINK_LIBRARIES(pcrecpp pcre)
522    
523    IF(MINGW AND NOT PCRE_STATIC)    IF(MINGW AND NOT PCRE_STATIC)
524      IF(NON_STANDARD_LIB_PREFIX)      IF(NON_STANDARD_LIB_PREFIX)
# Line 470  ENDIF(PCRE_BUILD_PCRECPP) Line 547  ENDIF(PCRE_BUILD_PCRECPP)
547  #         SET_TARGET_PROPERTIES(pcredemo PROPERTIES COMPILE_FLAGS "-DPCRE_STATIC")  #         SET_TARGET_PROPERTIES(pcredemo PROPERTIES COMPILE_FLAGS "-DPCRE_STATIC")
548  # ENDIF(NOT BUILD_SHARED_LIBS)  # ENDIF(NOT BUILD_SHARED_LIBS)
549    
550  IF(PCRE_BUILD_PCREGREP OR PCRE_BUILD_TESTS)  IF(PCRE_BUILD_PCREGREP)
551    ADD_EXECUTABLE(pcregrep pcregrep.c)    ADD_EXECUTABLE(pcregrep pcregrep.c)
552    SET(targets ${targets} pcregrep)    SET(targets ${targets} pcregrep)
553    TARGET_LINK_LIBRARIES(pcregrep pcreposix ${PCREGREP_LIBS})    TARGET_LINK_LIBRARIES(pcregrep pcreposix ${PCREGREP_LIBS})
554  ENDIF(PCRE_BUILD_PCREGREP OR PCRE_BUILD_TESTS)  ENDIF(PCRE_BUILD_PCREGREP)
555    
556  # Testing  # Testing
557  IF(PCRE_BUILD_TESTS)  IF(PCRE_BUILD_TESTS)
558    ENABLE_TESTING()    ENABLE_TESTING()
559    
560    ADD_EXECUTABLE(pcretest pcretest.c)    SET(PCRETEST_SOURCES pcretest.c)
561      IF(PCRE_BUILD_PCRE8)
562        LIST(APPEND PCRETEST_SOURCES pcre_printint.c)
563      ENDIF(PCRE_BUILD_PCRE8)
564      IF(PCRE_BUILD_PCRE16)
565        LIST(APPEND PCRETEST_SOURCES pcre16_printint.c)
566      ENDIF(PCRE_BUILD_PCRE16)
567    
568      ADD_EXECUTABLE(pcretest ${PCRETEST_SOURCES})
569    SET(targets ${targets} pcretest)    SET(targets ${targets} pcretest)
570    TARGET_LINK_LIBRARIES(pcretest pcreposix ${PCRETEST_LIBS})    IF(PCRE_BUILD_PCRE8)
571        LIST(APPEND PCRETEST_LIBS pcreposix pcre)
572      ENDIF(PCRE_BUILD_PCRE8)
573      IF(PCRE_BUILD_PCRE16)
574        LIST(APPEND PCRETEST_LIBS pcre16)
575      ENDIF(PCRE_BUILD_PCRE16)
576      TARGET_LINK_LIBRARIES(pcretest ${PCRETEST_LIBS})
577    
578    IF(PCRE_SUPPORT_JIT)    IF(PCRE_SUPPORT_JIT)
579      ADD_EXECUTABLE(pcre_jit_test pcre_jit_test.c)      ADD_EXECUTABLE(pcre_jit_test pcre_jit_test.c)
580      SET(targets ${targets} pcre_jit_test)      SET(targets ${targets} pcre_jit_test)
581      TARGET_LINK_LIBRARIES(pcre_jit_test pcre)      SET(PCRE_JIT_TEST_LIBS )
582        IF(PCRE_BUILD_PCRE8)
583          LIST(APPEND PCRE_JIT_TEST_LIBS pcre)
584        ENDIF(PCRE_BUILD_PCRE8)
585        IF(PCRE_BUILD_PCRE16)
586          LIST(APPEND PCRE_JIT_TEST_LIBS pcre16)
587        ENDIF(PCRE_BUILD_PCRE16)
588        TARGET_LINK_LIBRARIES(pcre_jit_test ${PCRE_JIT_TEST_LIBS})
589    ENDIF(PCRE_SUPPORT_JIT)    ENDIF(PCRE_SUPPORT_JIT)
590    
591    IF(PCRE_BUILD_PCRECPP)    IF(PCRE_BUILD_PCRECPP)
# Line 511  IF(PCRE_BUILD_TESTS) Line 609  IF(PCRE_BUILD_TESTS)
609    
610    # exes in Debug location tested by the RunTest shell script    # exes in Debug location tested by the RunTest shell script
611    # via "make test"    # via "make test"
612    GET_TARGET_PROPERTY(PCREGREP_EXE pcregrep DEBUG_LOCATION)    IF(PCRE_BUILD_PCREGREP)
613        GET_TARGET_PROPERTY(PCREGREP_EXE pcregrep DEBUG_LOCATION)
614      ENDIF(PCRE_BUILD_PCREGREP)
615    
616    GET_TARGET_PROPERTY(PCRETEST_EXE pcretest DEBUG_LOCATION)    GET_TARGET_PROPERTY(PCRETEST_EXE pcretest DEBUG_LOCATION)
617    
618  # =================================================  # =================================================
# Line 524  ${PROJECT_BINARY_DIR}/Testing/Temporary Line 625  ${PROJECT_BINARY_DIR}/Testing/Temporary
625  MESSAGE(\"\")  MESSAGE(\"\")
626  ")  ")
627    
628        FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_test.sh    FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_test.sh
629        "#! /bin/sh    "#! /bin/sh
630  # This is a generated file.  # This is a generated file.
631  srcdir=${PROJECT_SOURCE_DIR}  srcdir=${PROJECT_SOURCE_DIR}
 pcregrep=${PCREGREP_EXE}  
632  pcretest=${PCRETEST_EXE}  pcretest=${PCRETEST_EXE}
633  source ${PROJECT_SOURCE_DIR}/RunTest  source ${PROJECT_SOURCE_DIR}/RunTest
634  if test \"$?\" != \"0\"; then exit 1; fi  if test \"$?\" != \"0\"; then exit 1; fi
635  # End  # End
636  ")  ")
637    
638        FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_grep_test.sh    IF(UNIX)
639        "#! /bin/sh      ADD_TEST(pcre_test      sh ${PROJECT_BINARY_DIR}/pcre_test.sh)
640      ENDIF(UNIX)
641    
642      IF(PCRE_BUILD_PCREGREP)
643        FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_grep_test.sh
644        "#! /bin/sh
645  # This is a generated file.  # This is a generated file.
646  srcdir=${PROJECT_SOURCE_DIR}  srcdir=${PROJECT_SOURCE_DIR}
647  pcregrep=${PCREGREP_EXE}  pcregrep=${PCREGREP_EXE}
# Line 546  if test \"$?\" != \"0\"; then exit 1; fi Line 651  if test \"$?\" != \"0\"; then exit 1; fi
651  # End  # End
652  ")  ")
653    
654    IF(UNIX)      IF(UNIX)
655      ADD_TEST(pcre_test      sh ${PROJECT_BINARY_DIR}/pcre_test.sh)        ADD_TEST(pcre_grep_test sh ${PROJECT_BINARY_DIR}/pcre_grep_test.sh)
656      ADD_TEST(pcre_grep_test sh ${PROJECT_BINARY_DIR}/pcre_grep_test.sh)      ENDIF(UNIX)
657    ENDIF(UNIX)    ENDIF(PCRE_BUILD_PCREGREP)
658    
659    IF(WIN32)    IF(WIN32)
660      # Provide environment for executing the bat file version of RunTest      # Provide environment for executing the bat file version of RunTest
# Line 561  if test \"$?\" != \"0\"; then exit 1; fi Line 666  if test \"$?\" != \"0\"; then exit 1; fi
666  setlocal  setlocal
667  SET\ srcdir=\${srcdir}  SET\ srcdir=\${srcdir}
668  SET\ pcretest=\${pcretest}  SET\ pcretest=\${pcretest}
 SET\ pcregrep=\${pcregrep}  
669  call \"\${srcdir}\\RunTest.Bat\"  call \"\${srcdir}\\RunTest.Bat\"
670  if errorlevel 1 exit /b 1  if errorlevel 1 exit /b 1
671  echo RunTest.bat tests successfully completed  echo RunTest.bat tests successfully completed
# Line 570  echo RunTest.bat tests successfully comp Line 674  echo RunTest.bat tests successfully comp
674    FILE(WRITE ${PROJECT_BINARY_DIR}/BatDriver.cmake    FILE(WRITE ${PROJECT_BINARY_DIR}/BatDriver.cmake
675    "# This is a generated file.    "# This is a generated file.
676  # this script is run with arguments via the cmake command in add_test(NAME pcre_test_bat)  # this script is run with arguments via the cmake command in add_test(NAME pcre_test_bat)
677  # BatDriver feeds the actual location of pcretest.exe and pcregrep.exe  # BatDriver feeds the actual location of pcretest.exe
678  FILE(TO_NATIVE_PATH \${pcretestx} pcretest)  FILE(TO_NATIVE_PATH \${pcretestx} pcretest)
 FILE(TO_NATIVE_PATH \${pcregrepx} pcregrep)  
679  FILE(TO_NATIVE_PATH \${srcdirx} srcdir)  FILE(TO_NATIVE_PATH \${srcdirx} srcdir)
680  configure_file(\"\${bindirx}/pcre_test.txt\" \"\${bindirx}/pcre_test.bat\")  configure_file(\"\${bindirx}/pcre_test.txt\" \"\${bindirx}/pcre_test.bat\")
681  # MESSAGE(\"cmake\ variable\ pcretest\ is\ \${pcretest}\")  # MESSAGE(\"cmake\ variable\ pcretest\ is\ \${pcretest}\")
 # MESSAGE(\"cmake\ variable\ pcregrep\ is\ \${pcregrep}\")  
682  # STRING(REPLACE \" \" \"\\ \" bindir \${bindirx})  # STRING(REPLACE \" \" \"\\ \" bindir \${bindirx})
683  MESSAGE(\"COMMAND pcre_test.bat \")  MESSAGE(\"COMMAND pcre_test.bat \")
684  EXECUTE_PROCESS(COMMAND pcre_test.bat  EXECUTE_PROCESS(COMMAND pcre_test.bat
# Line 586  MESSAGE(\"OUTPUT: \${batoutput}\") Line 688  MESSAGE(\"OUTPUT: \${batoutput}\")
688  ")  ")
689    
690    ADD_TEST(NAME pcre_test_bat    ADD_TEST(NAME pcre_test_bat
691    COMMAND ${CMAKE_COMMAND} -D bindirx=${PROJECT_BINARY_DIR} -D srcdirx=${PROJECT_SOURCE_DIR} -D pcretestx=$<TARGET_FILE:pcretest> -D pcregrepx=$<TARGET_FILE:pcregrep> -P "${PROJECT_BINARY_DIR}/BatDriver.cmake")    COMMAND ${CMAKE_COMMAND} -D bindirx=${PROJECT_BINARY_DIR} -D srcdirx=${PROJECT_SOURCE_DIR} -D pcretestx=$<TARGET_FILE:pcretest> -P "${PROJECT_BINARY_DIR}/BatDriver.cmake")
692    SET_TESTS_PROPERTIES(pcre_test_bat PROPERTIES    SET_TESTS_PROPERTIES(pcre_test_bat PROPERTIES
693    PASS_REGULAR_EXPRESSION "RunTest\\.bat tests successfully completed")    PASS_REGULAR_EXPRESSION "RunTest\\.bat tests successfully completed")
694    
695      IF("$ENV{OSTYPE}" STREQUAL "msys")      IF("$ENV{OSTYPE}" STREQUAL "msys")
696      # Both the sh and bat file versions of RunTest are run if make test is used        # Both the sh and bat file versions of RunTest are run if make test is used
697      # in msys        # in msys
   
698        ADD_TEST(pcre_test_sh    sh.exe ${PROJECT_BINARY_DIR}/pcre_test.sh)        ADD_TEST(pcre_test_sh    sh.exe ${PROJECT_BINARY_DIR}/pcre_test.sh)
699        ADD_TEST(pcre_grep_test sh.exe ${PROJECT_BINARY_DIR}/pcre_grep_test.sh)        IF(PCRE_BUILD_PCREGREP)
700            ADD_TEST(pcre_grep_test  sh.exe ${PROJECT_BINARY_DIR}/pcre_grep_test.sh)
701          ENDIF(PCRE_BUILD_PCREGREP)
702      ENDIF("$ENV{OSTYPE}" STREQUAL "msys")      ENDIF("$ENV{OSTYPE}" STREQUAL "msys")
703    
704    ENDIF(WIN32)    ENDIF(WIN32)
705    
706    # Changed to accommodate testing whichever location was just built    # Changed to accommodate testing whichever location was just built
707    
708    IF(PCRE_SUPPORT_JIT)    IF(PCRE_SUPPORT_JIT)
709    ADD_TEST(pcre_jit_test       pcre_jit_test)      ADD_TEST(pcre_jit_test         pcre_jit_test)
710    ENDIF(PCRE_SUPPORT_JIT)    ENDIF(PCRE_SUPPORT_JIT)
711    
712    IF(PCRE_BUILD_PCRECPP)    IF(PCRE_BUILD_PCRECPP)
713      ADD_TEST(pcrecpp_test          pcrecpp_unittest)      ADD_TEST(pcrecpp_test          pcrecpp_unittest)
714      ADD_TEST(pcre_scanner_test     pcre_scanner_unittest)      ADD_TEST(pcre_scanner_test     pcre_scanner_unittest)
715      ADD_TEST(pcre_stringpiece_test pcre_stringpiece_unittest)      ADD_TEST(pcre_stringpiece_test pcre_stringpiece_unittest)
   
716    ENDIF(PCRE_BUILD_PCRECPP)    ENDIF(PCRE_BUILD_PCRECPP)
717    
718  ENDIF(PCRE_BUILD_TESTS)  ENDIF(PCRE_BUILD_TESTS)
719    
720  # Installation  # Installation
# Line 670  IF(PCRE_SHOW_REPORT) Line 773  IF(PCRE_SHOW_REPORT)
773    MESSAGE(STATUS "  C compiler flags ................ : ${CMAKE_C_FLAGS}${cfsp}${CMAKE_C_FLAGS_${buildtype}}")    MESSAGE(STATUS "  C compiler flags ................ : ${CMAKE_C_FLAGS}${cfsp}${CMAKE_C_FLAGS_${buildtype}}")
774    MESSAGE(STATUS "  C++ compiler flags .............. : ${CMAKE_CXX_FLAGS}${cxxfsp}${CMAKE_CXX_FLAGS_${buildtype}}")    MESSAGE(STATUS "  C++ compiler flags .............. : ${CMAKE_CXX_FLAGS}${cxxfsp}${CMAKE_CXX_FLAGS_${buildtype}}")
775    MESSAGE(STATUS "")    MESSAGE(STATUS "")
776      MESSAGE(STATUS "  Build 8 bit PCRE library ........ : ${PCRE_BUILD_PCRE8}")
777      MESSAGE(STATUS "  Build 16 bit PCRE library ....... : ${PCRE_BUILD_PCRE16}")
778    MESSAGE(STATUS "  Build C++ library ............... : ${PCRE_BUILD_PCRECPP}")    MESSAGE(STATUS "  Build C++ library ............... : ${PCRE_BUILD_PCRECPP}")
779    MESSAGE(STATUS "  Enable JIT compiling support .... : ${PCRE_SUPPORT_JIT}")    MESSAGE(STATUS "  Enable JIT compiling support .... : ${PCRE_SUPPORT_JIT}")
780    MESSAGE(STATUS "  Enable UTF-8 support ............ : ${PCRE_SUPPORT_UNICODE_PROPERTIES}")    MESSAGE(STATUS "  Enable UTF support .............. : ${PCRE_SUPPORT_UTF}")
781    MESSAGE(STATUS "  Unicode properties .............. : ${PCRE_SUPPORT_UNICODE_PROPERTIES}")    MESSAGE(STATUS "  Unicode properties .............. : ${PCRE_SUPPORT_UNICODE_PROPERTIES}")
782    MESSAGE(STATUS "  Newline char/sequence ........... : ${PCRE_NEWLINE}")    MESSAGE(STATUS "  Newline char/sequence ........... : ${PCRE_NEWLINE}")
783    MESSAGE(STATUS "  \\R matches only ANYCRLF ......... : ${PCRE_SUPPORT_BSR_ANYCRLF}")    MESSAGE(STATUS "  \\R matches only ANYCRLF ......... : ${PCRE_SUPPORT_BSR_ANYCRLF}")

Legend:
Removed from v.853  
changed lines
  Added in v.863

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12