diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2019-12-17 01:37:59 +0400 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-12-21 10:34:02 +0100 |
commit | 9dadfdcde5a63a4d67f0f7a3720632bcb1d589d7 (patch) | |
tree | 5fd6298b3dfe07cc08bd6ffebbe65081818c13ac /cmake | |
parent | ce70573f6255d2720c39309e0d41e181dab2d685 (diff) | |
download | mariadb-git-9dadfdcde5a63a4d67f0f7a3720632bcb1d589d7.tar.gz |
MDEV-14024 PCRE2.
Related changes in the server code.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/pcre.cmake | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/cmake/pcre.cmake b/cmake/pcre.cmake index 4c113929866..a3a845bf30f 100644 --- a/cmake/pcre.cmake +++ b/cmake/pcre.cmake @@ -5,24 +5,17 @@ SET(WITH_PCRE "auto" CACHE STRING MACRO (CHECK_PCRE) IF(WITH_PCRE STREQUAL "system" OR WITH_PCRE STREQUAL "auto") - CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE_STACK_GUARD) - IF(NOT CMAKE_CROSSCOMPILING) - SET(CMAKE_REQUIRED_LIBRARIES "pcre") - CHECK_C_SOURCE_RUNS(" - #include <pcre.h> - int main() { - return -pcre_exec(NULL, NULL, NULL, -999, -999, 0, NULL, 0) < 256; - }" PCRE_STACK_SIZE_OK) - SET(CMAKE_REQUIRED_LIBRARIES) - ENDIF() + CHECK_LIBRARY_EXISTS(pcre2-8 pcre2_match_8 "" HAVE_PCRE2) ENDIF() - IF(NOT HAVE_PCRE_STACK_GUARD OR NOT PCRE_STACK_SIZE_OK OR - WITH_PCRE STREQUAL "bundled") + IF(NOT HAVE_PCRE2 OR WITH_PCRE STREQUAL "bundled") IF (WITH_PCRE STREQUAL "system") - MESSAGE(FATAL_ERROR "system pcre is not found or unusable") + MESSAGE(FATAL_ERROR "system pcre2-8 library is not found or unusable") ENDIF() - SET(PCRE_INCLUDES ${CMAKE_BINARY_DIR}/pcre ${CMAKE_SOURCE_DIR}/pcre) - ADD_SUBDIRECTORY(pcre) + SET(PCRE_INCLUDES ${CMAKE_BINARY_DIR}/pcre2 ${CMAKE_SOURCE_DIR}/pcre2 + ${CMAKE_BINARY_DIR}/pcre2/src ${CMAKE_SOURCE_DIR}/pcre2/src) + SET(PCRE2_BUILD_TESTS OFF CACHE BOOL "Disable tests.") + SET(PCRE2_BUILD_PCRE2GREP OFF CACHE BOOL "Disable pcre2grep") + ADD_SUBDIRECTORY(pcre2) ENDIF() ENDMACRO() |