/[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 416 by ph10, Sat Apr 11 14:34:02 2009 UTC revision 684 by ph10, Tue Sep 6 10:44:57 2011 UTC
# Line 35  Line 35 
35  #            to disable the final configuration report.  #            to disable the final configuration report.
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
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    
44  PROJECT(PCRE C CXX)  PROJECT(PCRE C CXX)
45    
# Line 55  INCLUDE(CheckFunctionExists) Line 60  INCLUDE(CheckFunctionExists)
60  INCLUDE(CheckTypeSize)  INCLUDE(CheckTypeSize)
61    
62  CHECK_INCLUDE_FILE(dirent.h     HAVE_DIRENT_H)  CHECK_INCLUDE_FILE(dirent.h     HAVE_DIRENT_H)
63    CHECK_INCLUDE_FILE(stdint.h     HAVE_STDINT_H)
64    CHECK_INCLUDE_FILE(inttypes.h   HAVE_INTTYPES_H)
65  CHECK_INCLUDE_FILE(sys/stat.h   HAVE_SYS_STAT_H)  CHECK_INCLUDE_FILE(sys/stat.h   HAVE_SYS_STAT_H)
66  CHECK_INCLUDE_FILE(sys/types.h  HAVE_SYS_TYPES_H)  CHECK_INCLUDE_FILE(sys/types.h  HAVE_SYS_TYPES_H)
67  CHECK_INCLUDE_FILE(unistd.h     HAVE_UNISTD_H)  CHECK_INCLUDE_FILE(unistd.h     HAVE_UNISTD_H)
# Line 95  SET(PCRE_MATCH_LIMIT "10000000" CACHE ST Line 102  SET(PCRE_MATCH_LIMIT "10000000" CACHE ST
102  SET(PCRE_MATCH_LIMIT_RECURSION "MATCH_LIMIT" CACHE STRING  SET(PCRE_MATCH_LIMIT_RECURSION "MATCH_LIMIT" CACHE STRING
103      "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.")
104    
105    SET(PCREGREP_BUFSIZE "20480" CACHE STRING
106        "Buffer size parameter for pcregrep. See PCREGREP_BUFSIZE in config.h.in for details.")
107    
108  SET(PCRE_NEWLINE "LF" CACHE STRING  SET(PCRE_NEWLINE "LF" CACHE STRING
109      "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).")
110    
# Line 104  SET(PCRE_NO_RECURSE OFF CACHE BOOL Line 114  SET(PCRE_NO_RECURSE OFF CACHE BOOL
114  SET(PCRE_POSIX_MALLOC_THRESHOLD "10" CACHE STRING  SET(PCRE_POSIX_MALLOC_THRESHOLD "10" CACHE STRING
115      "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.")
116    
117    SET(PCRE_SUPPORT_JIT OFF CACHE BOOL
118        "Enable support for Just-in-time compiling.")
119    
120  SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF CACHE BOOL  SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF CACHE BOOL
121      "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)")
122    
# Line 198  IF(PCRE_SUPPORT_UNICODE_PROPERTIES) Line 211  IF(PCRE_SUPPORT_UNICODE_PROPERTIES)
211          SET(SUPPORT_UCP 1)          SET(SUPPORT_UCP 1)
212  ENDIF(PCRE_SUPPORT_UNICODE_PROPERTIES)  ENDIF(PCRE_SUPPORT_UNICODE_PROPERTIES)
213    
214    IF(PCRE_SUPPORT_JIT)
215            SET(SUPPORT_JIT 1)
216    ENDIF(PCRE_SUPPORT_JIT)
217    
218  # This next one used to contain  # This next one used to contain
219  #       SET(PCRETEST_LIBS ${READLINE_LIBRARY})  #       SET(PCRETEST_LIBS ${READLINE_LIBRARY})
220  # 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 305  SET(PCRE_SOURCES Line 322  SET(PCRE_SOURCES
322    pcre_get.c    pcre_get.c
323    pcre_globals.c    pcre_globals.c
324    pcre_info.c    pcre_info.c
325      pcre_jit_compile.c
326    pcre_newline.c    pcre_newline.c
327    pcre_maketables.c    pcre_maketables.c
328    pcre_ord2utf8.c    pcre_ord2utf8.c
# Line 421  IF(PCRE_BUILD_TESTS) Line 439  IF(PCRE_BUILD_TESTS)
439    ADD_EXECUTABLE(pcretest pcretest.c)    ADD_EXECUTABLE(pcretest pcretest.c)
440    SET(targets ${targets} pcretest)    SET(targets ${targets} pcretest)
441    TARGET_LINK_LIBRARIES(pcretest pcreposix ${PCRETEST_LIBS})    TARGET_LINK_LIBRARIES(pcretest pcreposix ${PCRETEST_LIBS})
442    
443      IF(PCRE_SUPPORT_JIT)
444        ADD_EXECUTABLE(pcre_jit_test pcre_jit_test.c)
445        SET(targets ${targets} pcre_jit_test)
446        TARGET_LINK_LIBRARIES(pcre_jit_test pcre)
447      ENDIF(PCRE_SUPPORT_JIT)
448    
449    IF(PCRE_BUILD_PCRECPP)    IF(PCRE_BUILD_PCRECPP)
450      ADD_EXECUTABLE(pcrecpp_unittest pcrecpp_unittest.cc)      ADD_EXECUTABLE(pcrecpp_unittest pcrecpp_unittest.cc)
# Line 432  IF(PCRE_BUILD_TESTS) Line 456  IF(PCRE_BUILD_TESTS)
456        )        )
457      ENDIF(MINGW AND NON_STANDARD_LIB_NAMES AND NOT PCRE_STATIC)      ENDIF(MINGW AND NON_STANDARD_LIB_NAMES AND NOT PCRE_STATIC)
458    
   
459      ADD_EXECUTABLE(pcre_scanner_unittest pcre_scanner_unittest.cc)      ADD_EXECUTABLE(pcre_scanner_unittest pcre_scanner_unittest.cc)
460      SET(targets ${targets} pcre_scanner_unittest)      SET(targets ${targets} pcre_scanner_unittest)
461      TARGET_LINK_LIBRARIES(pcre_scanner_unittest pcrecpp)      TARGET_LINK_LIBRARIES(pcre_scanner_unittest pcrecpp)
# Line 460  IF(PCRE_BUILD_TESTS) Line 483  IF(PCRE_BUILD_TESTS)
483            ADD_TEST(pcre_grep_test ${PROJECT_SOURCE_DIR}/RunGrepTest)            ADD_TEST(pcre_grep_test ${PROJECT_SOURCE_DIR}/RunGrepTest)
484    ENDIF(UNIX)    ENDIF(UNIX)
485    IF(WIN32)    IF(WIN32)
486            ADD_TEST(pcre_test cmd /C ${PROJECT_SOURCE_DIR}/RunTest.bat)            # ADD_TEST(pcre_test cmd /C ${PROJECT_SOURCE_DIR}/RunTest.bat)
487              ADD_TEST(pcre_test ${PROJECT_SOURCE_DIR}/RunTest.bat)
488    ENDIF(WIN32)    ENDIF(WIN32)
489    
490      IF(PCRE_SUPPORT_JIT)
491      GET_TARGET_PROPERTY(PCRE_JIT_TEST_EXE
492                          pcre_jit_test
493                          DEBUG_LOCATION)
494      ENDIF(PCRE_SUPPORT_JIT)
495    
496    GET_TARGET_PROPERTY(PCRECPP_UNITTEST_EXE    GET_TARGET_PROPERTY(PCRECPP_UNITTEST_EXE
497                        pcrecpp_unittest                        pcrecpp_unittest
498                        DEBUG_LOCATION)                        DEBUG_LOCATION)
# Line 475  IF(PCRE_BUILD_TESTS) Line 505  IF(PCRE_BUILD_TESTS)
505                        pcre_stringpiece_unittest                        pcre_stringpiece_unittest
506                        DEBUG_LOCATION)                        DEBUG_LOCATION)
507    
508      IF(PCRE_SUPPORT_JIT)
509      ADD_TEST(pcre_jit_test         ${PCRE_JIT_TEST_EXE})
510      ENDIF(PCRE_SUPPORT_JIT)
511    ADD_TEST(pcrecpp_test          ${PCRECPP_UNITTEST_EXE})    ADD_TEST(pcrecpp_test          ${PCRECPP_UNITTEST_EXE})
512    ADD_TEST(pcre_scanner_test     ${PCRE_SCANNER_UNITTEST_EXE})    ADD_TEST(pcre_scanner_test     ${PCRE_SCANNER_UNITTEST_EXE})
513    ADD_TEST(pcre_stringpiece_test ${PCRE_STRINGPIECE_UNITTEST_EXE})    ADD_TEST(pcre_stringpiece_test ${PCRE_STRINGPIECE_UNITTEST_EXE})
# Line 538  IF(PCRE_SHOW_REPORT) Line 571  IF(PCRE_SHOW_REPORT)
571    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}}")
572    MESSAGE(STATUS "")    MESSAGE(STATUS "")
573    MESSAGE(STATUS "  Build C++ library ............... : ${PCRE_BUILD_PCRECPP}")    MESSAGE(STATUS "  Build C++ library ............... : ${PCRE_BUILD_PCRECPP}")
574      MESSAGE(STATUS "  Enable JIT compiling support .... : ${PCRE_SUPPORT_JIT}")
575    MESSAGE(STATUS "  Enable UTF-8 support ............ : ${PCRE_SUPPORT_UNICODE_PROPERTIES}")    MESSAGE(STATUS "  Enable UTF-8 support ............ : ${PCRE_SUPPORT_UNICODE_PROPERTIES}")
576    MESSAGE(STATUS "  Unicode properties .............. : ${PCRE_SUPPORT_UNICODE_PROPERTIES}")    MESSAGE(STATUS "  Unicode properties .............. : ${PCRE_SUPPORT_UNICODE_PROPERTIES}")
577    MESSAGE(STATUS "  Newline char/sequence ........... : ${PCRE_NEWLINE}")    MESSAGE(STATUS "  Newline char/sequence ........... : ${PCRE_NEWLINE}")
# Line 552  IF(PCRE_SHOW_REPORT) Line 586  IF(PCRE_SHOW_REPORT)
586    MESSAGE(STATUS "  Build shared libs ............... : ${BUILD_SHARED_LIBS}")    MESSAGE(STATUS "  Build shared libs ............... : ${BUILD_SHARED_LIBS}")
587    MESSAGE(STATUS "  Build static libs ............... : ${BUILD_STATIC_LIBS}")    MESSAGE(STATUS "  Build static libs ............... : ${BUILD_STATIC_LIBS}")
588    MESSAGE(STATUS "  Build pcregrep .................. : ${PCRE_BUILD_PCREGREP}")    MESSAGE(STATUS "  Build pcregrep .................. : ${PCRE_BUILD_PCREGREP}")
589      MESSAGE(STATUS "  Buffer size for pcregrep ........ : ${PCREGREP_BUFSIZE}")
590    MESSAGE(STATUS "  Build tests (implies pcretest) .. : ${PCRE_BUILD_TESTS}")    MESSAGE(STATUS "  Build tests (implies pcretest) .. : ${PCRE_BUILD_TESTS}")
591    IF(ZLIB_FOUND)    IF(ZLIB_FOUND)
592      MESSAGE(STATUS "  Link pcregrep with libz ......... : ${PCRE_SUPPORT_LIBZ}")      MESSAGE(STATUS "  Link pcregrep with libz ......... : ${PCRE_SUPPORT_LIBZ}")

Legend:
Removed from v.416  
changed lines
  Added in v.684

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12