diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-10-24 14:53:18 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-10-24 14:53:18 +0200 |
commit | e0a1c745ec3ed1ec6c0375a2a624697c29f480a6 (patch) | |
tree | 24ded2c6ebe3ea3413ce56af89ea0f2f63bb3a39 /cmake | |
parent | 4ec88ea9c3ec52d996b39167d12a61ab95fdeacc (diff) | |
parent | 2aa51f528fd5d23cc54eca8fbd07e88e7b2993c7 (diff) | |
download | mariadb-git-e0a1c745ec3ed1ec6c0375a2a624697c29f480a6.tar.gz |
Merge branch '10.1' into 10.2
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/cpack_rpm.cmake | 11 | ||||
-rw-r--r-- | cmake/maintainer.cmake | 5 | ||||
-rw-r--r-- | cmake/pcre.cmake | 16 |
3 files changed, 27 insertions, 5 deletions
diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake index 47daa88d0a2..5b8aa36ff0d 100644 --- a/cmake/cpack_rpm.cmake +++ b/cmake/cpack_rpm.cmake @@ -165,9 +165,14 @@ SETA(CPACK_RPM_server_PACKAGE_REQUIRES "MariaDB-client") IF(WITH_WSREP) -SETA(CPACK_RPM_server_PACKAGE_REQUIRES - "galera" "rsync" "lsof" "grep" "gawk" "iproute" - "coreutils" "findutils" "tar" "which") + SETA(CPACK_RPM_server_PACKAGE_REQUIRES + "galera" "rsync" "lsof" "grep" "gawk" "iproute" + "coreutils" "findutils" "tar") + IF (RPM MATCHES "sles11") + SETA(CPACK_RPM_server_PACKAGE_REQUIRES "util-linux") + ELSE() + SETA(CPACK_RPM_server_PACKAGE_REQUIRES "which") + ENDIF() ENDIF() SET(CPACK_RPM_server_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-prein.sh) diff --git a/cmake/maintainer.cmake b/cmake/maintainer.cmake index bb7c8862dc7..bd2cfd7097c 100644 --- a/cmake/maintainer.cmake +++ b/cmake/maintainer.cmake @@ -20,6 +20,11 @@ IF(have_C__Wvla) SET(MY_WARNING_FLAGS "${MY_WARNING_FLAGS} -Wvla") ENDIF() +MY_CHECK_C_COMPILER_FLAG("-Wno-format-truncation") +IF(HAVE_C__Wno_format_truncation) + SET(MY_WARNING_FLAGS "${MY_WARNING_FLAGS} -Wno-format-truncation") +ENDIF() + # Common warning flags for GCC and Clang SET(MY_C_WARNING_FLAGS "${MY_WARNING_FLAGS} -Wwrite-strings -Wdeclaration-after-statement") diff --git a/cmake/pcre.cmake b/cmake/pcre.cmake index 894bde38974..4c113929866 100644 --- a/cmake/pcre.cmake +++ b/cmake/pcre.cmake @@ -1,11 +1,23 @@ +INCLUDE (CheckCSourceRuns) + SET(WITH_PCRE "auto" CACHE STRING "Which pcre to use (possible values are 'bundled', 'system', or 'auto')") MACRO (CHECK_PCRE) IF(WITH_PCRE STREQUAL "system" OR WITH_PCRE STREQUAL "auto") - CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE) + 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() ENDIF() - IF(NOT HAVE_PCRE OR WITH_PCRE STREQUAL "bundled") + IF(NOT HAVE_PCRE_STACK_GUARD OR NOT PCRE_STACK_SIZE_OK OR + WITH_PCRE STREQUAL "bundled") IF (WITH_PCRE STREQUAL "system") MESSAGE(FATAL_ERROR "system pcre is not found or unusable") ENDIF() |