/[pcre]/code/branches/pcre16/CMakeLists.txt
ViewVC logotype

Diff of /code/branches/pcre16/CMakeLists.txt

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

revision 475 by ph10, Sat Jan 2 18:21:30 2010 UTC revision 698 by ph10, Mon Sep 19 15:43:02 2011 UTC
# Line 36  Line 36 
36  # 2009-04-11 PH applied Christian Ehrlicher's patch to show compiler flags that  # 2009-04-11 PH applied Christian Ehrlicher's patch to show compiler flags that
37  #            are set by specifying a release type.  #            are set by specifying a release type.
38  # 2010-01-02 PH added test for stdint.h  # 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    
45  PROJECT(PCRE C CXX)  PROJECT(PCRE C CXX)
46    
# Line 57  INCLUDE(CheckTypeSize) Line 62  INCLUDE(CheckTypeSize)
62    
63  CHECK_INCLUDE_FILE(dirent.h     HAVE_DIRENT_H)  CHECK_INCLUDE_FILE(dirent.h     HAVE_DIRENT_H)
64  CHECK_INCLUDE_FILE(stdint.h     HAVE_STDINT_H)  CHECK_INCLUDE_FILE(stdint.h     HAVE_STDINT_H)
65    CHECK_INCLUDE_FILE(inttypes.h   HAVE_INTTYPES_H)
66  CHECK_INCLUDE_FILE(sys/stat.h   HAVE_SYS_STAT_H)  CHECK_INCLUDE_FILE(sys/stat.h   HAVE_SYS_STAT_H)
67  CHECK_INCLUDE_FILE(sys/types.h  HAVE_SYS_TYPES_H)  CHECK_INCLUDE_FILE(sys/types.h  HAVE_SYS_TYPES_H)
68  CHECK_INCLUDE_FILE(unistd.h     HAVE_UNISTD_H)  CHECK_INCLUDE_FILE(unistd.h     HAVE_UNISTD_H)
# Line 97  SET(PCRE_MATCH_LIMIT "10000000" CACHE ST Line 103  SET(PCRE_MATCH_LIMIT "10000000" CACHE ST
103  SET(PCRE_MATCH_LIMIT_RECURSION "MATCH_LIMIT" CACHE STRING  SET(PCRE_MATCH_LIMIT_RECURSION "MATCH_LIMIT" CACHE STRING
104      "Default limit on internal recursion. See MATCH_LIMIT_RECURSION in config.h.in for details.")      "Default limit on internal recursion. See MATCH_LIMIT_RECURSION in config.h.in for details.")
105    
106    SET(PCREGREP_BUFSIZE "20480" CACHE STRING
107        "Buffer size parameter for pcregrep. See PCREGREP_BUFSIZE in config.h.in for details.")
108    
109  SET(PCRE_NEWLINE "LF" CACHE STRING  SET(PCRE_NEWLINE "LF" CACHE STRING
110      "What to recognize as a newline (one of CR, LF, CRLF, ANY, ANYCRLF).")      "What to recognize as a newline (one of CR, LF, CRLF, ANY, ANYCRLF).")
111    
# Line 106  SET(PCRE_NO_RECURSE OFF CACHE BOOL Line 115  SET(PCRE_NO_RECURSE OFF CACHE BOOL
115  SET(PCRE_POSIX_MALLOC_THRESHOLD "10" CACHE STRING  SET(PCRE_POSIX_MALLOC_THRESHOLD "10" CACHE STRING
116      "Threshold for malloc() usage. See POSIX_MALLOC_THRESHOLD in config.h.in for details.")      "Threshold for malloc() usage. See POSIX_MALLOC_THRESHOLD in config.h.in for details.")
117    
118    SET(PCRE_SUPPORT_JIT OFF CACHE BOOL
119        "Enable support for Just-in-time compiling.")
120    
121    SET(PCRE_SUPPORT_PCREGREP_JIT ON CACHE BOOL
122        "Enable use of Just-in-time compiling in pcregrep.")
123    
124  SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF CACHE BOOL  SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF CACHE BOOL
125      "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)")
126    
# Line 200  IF(PCRE_SUPPORT_UNICODE_PROPERTIES) Line 215  IF(PCRE_SUPPORT_UNICODE_PROPERTIES)
215          SET(SUPPORT_UCP 1)          SET(SUPPORT_UCP 1)
216  ENDIF(PCRE_SUPPORT_UNICODE_PROPERTIES)  ENDIF(PCRE_SUPPORT_UNICODE_PROPERTIES)
217    
218    IF(PCRE_SUPPORT_JIT)
219            SET(SUPPORT_JIT 1)
220    ENDIF(PCRE_SUPPORT_JIT)
221    
222    IF(PCRE_SUPPORT_PCREGREP_JIT)
223            SET(SUPPORT_PCREGREP_JIT 1)
224    ENDIF(PCRE_SUPPORT_PCREGREP_JIT)
225    
226  # This next one used to contain  # This next one used to contain
227  #       SET(PCRETEST_LIBS ${READLINE_LIBRARY})  #       SET(PCRETEST_LIBS ${READLINE_LIBRARY})
228  # 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 307  SET(PCRE_SOURCES Line 330  SET(PCRE_SOURCES
330    pcre_get.c    pcre_get.c
331    pcre_globals.c    pcre_globals.c
332    pcre_info.c    pcre_info.c
333      pcre_jit_compile.c
334    pcre_newline.c    pcre_newline.c
335    pcre_maketables.c    pcre_maketables.c
336    pcre_ord2utf8.c    pcre_ord2utf8.c
# Line 424  IF(PCRE_BUILD_TESTS) Line 448  IF(PCRE_BUILD_TESTS)
448    SET(targets ${targets} pcretest)    SET(targets ${targets} pcretest)
449    TARGET_LINK_LIBRARIES(pcretest pcreposix ${PCRETEST_LIBS})    TARGET_LINK_LIBRARIES(pcretest pcreposix ${PCRETEST_LIBS})
450    
451      IF(PCRE_SUPPORT_JIT)
452        ADD_EXECUTABLE(pcre_jit_test pcre_jit_test.c)
453        SET(targets ${targets} pcre_jit_test)
454        TARGET_LINK_LIBRARIES(pcre_jit_test pcre)
455      ENDIF(PCRE_SUPPORT_JIT)
456    
457    IF(PCRE_BUILD_PCRECPP)    IF(PCRE_BUILD_PCRECPP)
458      ADD_EXECUTABLE(pcrecpp_unittest pcrecpp_unittest.cc)      ADD_EXECUTABLE(pcrecpp_unittest pcrecpp_unittest.cc)
459      SET(targets ${targets} pcrecpp_unittest)      SET(targets ${targets} pcrecpp_unittest)
# Line 434  IF(PCRE_BUILD_TESTS) Line 464  IF(PCRE_BUILD_TESTS)
464        )        )
465      ENDIF(MINGW AND NON_STANDARD_LIB_NAMES AND NOT PCRE_STATIC)      ENDIF(MINGW AND NON_STANDARD_LIB_NAMES AND NOT PCRE_STATIC)
466    
   
467      ADD_EXECUTABLE(pcre_scanner_unittest pcre_scanner_unittest.cc)      ADD_EXECUTABLE(pcre_scanner_unittest pcre_scanner_unittest.cc)
468      SET(targets ${targets} pcre_scanner_unittest)      SET(targets ${targets} pcre_scanner_unittest)
469      TARGET_LINK_LIBRARIES(pcre_scanner_unittest pcrecpp)      TARGET_LINK_LIBRARIES(pcre_scanner_unittest pcrecpp)
# Line 462  IF(PCRE_BUILD_TESTS) Line 491  IF(PCRE_BUILD_TESTS)
491            ADD_TEST(pcre_grep_test ${PROJECT_SOURCE_DIR}/RunGrepTest)            ADD_TEST(pcre_grep_test ${PROJECT_SOURCE_DIR}/RunGrepTest)
492    ENDIF(UNIX)    ENDIF(UNIX)
493    IF(WIN32)    IF(WIN32)
494            ADD_TEST(pcre_test cmd /C ${PROJECT_SOURCE_DIR}/RunTest.bat)            # ADD_TEST(pcre_test cmd /C ${PROJECT_SOURCE_DIR}/RunTest.bat)
495              ADD_TEST(pcre_test ${PROJECT_SOURCE_DIR}/RunTest.bat)
496    ENDIF(WIN32)    ENDIF(WIN32)
497    
498      IF(PCRE_SUPPORT_JIT)
499      GET_TARGET_PROPERTY(PCRE_JIT_TEST_EXE
500                          pcre_jit_test
501                          DEBUG_LOCATION)
502      ENDIF(PCRE_SUPPORT_JIT)
503    
504    GET_TARGET_PROPERTY(PCRECPP_UNITTEST_EXE    GET_TARGET_PROPERTY(PCRECPP_UNITTEST_EXE
505                        pcrecpp_unittest                        pcrecpp_unittest
506                        DEBUG_LOCATION)                        DEBUG_LOCATION)
# Line 477  IF(PCRE_BUILD_TESTS) Line 513  IF(PCRE_BUILD_TESTS)
513                        pcre_stringpiece_unittest                        pcre_stringpiece_unittest
514                        DEBUG_LOCATION)                        DEBUG_LOCATION)
515    
516      IF(PCRE_SUPPORT_JIT)
517      ADD_TEST(pcre_jit_test         ${PCRE_JIT_TEST_EXE})
518      ENDIF(PCRE_SUPPORT_JIT)
519    ADD_TEST(pcrecpp_test          ${PCRECPP_UNITTEST_EXE})    ADD_TEST(pcrecpp_test          ${PCRECPP_UNITTEST_EXE})
520    ADD_TEST(pcre_scanner_test     ${PCRE_SCANNER_UNITTEST_EXE})    ADD_TEST(pcre_scanner_test     ${PCRE_SCANNER_UNITTEST_EXE})
521    ADD_TEST(pcre_stringpiece_test ${PCRE_STRINGPIECE_UNITTEST_EXE})    ADD_TEST(pcre_stringpiece_test ${PCRE_STRINGPIECE_UNITTEST_EXE})
# Line 540  IF(PCRE_SHOW_REPORT) Line 579  IF(PCRE_SHOW_REPORT)
579    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}}")
580    MESSAGE(STATUS "")    MESSAGE(STATUS "")
581    MESSAGE(STATUS "  Build C++ library ............... : ${PCRE_BUILD_PCRECPP}")    MESSAGE(STATUS "  Build C++ library ............... : ${PCRE_BUILD_PCRECPP}")
582      MESSAGE(STATUS "  Enable JIT compiling support .... : ${PCRE_SUPPORT_JIT}")
583    MESSAGE(STATUS "  Enable UTF-8 support ............ : ${PCRE_SUPPORT_UNICODE_PROPERTIES}")    MESSAGE(STATUS "  Enable UTF-8 support ............ : ${PCRE_SUPPORT_UNICODE_PROPERTIES}")
584    MESSAGE(STATUS "  Unicode properties .............. : ${PCRE_SUPPORT_UNICODE_PROPERTIES}")    MESSAGE(STATUS "  Unicode properties .............. : ${PCRE_SUPPORT_UNICODE_PROPERTIES}")
585    MESSAGE(STATUS "  Newline char/sequence ........... : ${PCRE_NEWLINE}")    MESSAGE(STATUS "  Newline char/sequence ........... : ${PCRE_NEWLINE}")
# Line 554  IF(PCRE_SHOW_REPORT) Line 594  IF(PCRE_SHOW_REPORT)
594    MESSAGE(STATUS "  Build shared libs ............... : ${BUILD_SHARED_LIBS}")    MESSAGE(STATUS "  Build shared libs ............... : ${BUILD_SHARED_LIBS}")
595    MESSAGE(STATUS "  Build static libs ............... : ${BUILD_STATIC_LIBS}")    MESSAGE(STATUS "  Build static libs ............... : ${BUILD_STATIC_LIBS}")
596    MESSAGE(STATUS "  Build pcregrep .................. : ${PCRE_BUILD_PCREGREP}")    MESSAGE(STATUS "  Build pcregrep .................. : ${PCRE_BUILD_PCREGREP}")
597      MESSAGE(STATUS "  Enable JIT in pcregrep .......... : ${PCRE_SUPPORT_PCREGREP_JIT}")
598      MESSAGE(STATUS "  Buffer size for pcregrep ........ : ${PCREGREP_BUFSIZE}")
599    MESSAGE(STATUS "  Build tests (implies pcretest) .. : ${PCRE_BUILD_TESTS}")    MESSAGE(STATUS "  Build tests (implies pcretest) .. : ${PCRE_BUILD_TESTS}")
600    IF(ZLIB_FOUND)    IF(ZLIB_FOUND)
601      MESSAGE(STATUS "  Link pcregrep with libz ......... : ${PCRE_SUPPORT_LIBZ}")      MESSAGE(STATUS "  Link pcregrep with libz ......... : ${PCRE_SUPPORT_LIBZ}")

Legend:
Removed from v.475  
changed lines
  Added in v.698

  ViewVC Help
Powered by ViewVC 1.1.5