diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-10-30 16:42:46 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-10-30 16:42:46 +0400 |
commit | 003cb2f42477772ae43228c0bc0f8492246b9340 (patch) | |
tree | 680314d232d55b5a41dc2b2f5b500677e4aff183 /cmake | |
parent | 84ed288f6807a4602e0af8615bfb17080df15160 (diff) | |
parent | 58e0dcb93dc2b2bf49f76c754bd216dbdf875a0d (diff) | |
download | mariadb-git-003cb2f42477772ae43228c0bc0f8492246b9340.tar.gz |
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/cpack_rpm.cmake | 11 | ||||
-rw-r--r-- | cmake/maintainer.cmake | 5 | ||||
-rw-r--r-- | cmake/mariadb_connector_c.cmake | 6 | ||||
-rw-r--r-- | cmake/mysql_version.cmake | 8 | ||||
-rw-r--r-- | cmake/pcre.cmake | 16 |
5 files changed, 31 insertions, 15 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/mariadb_connector_c.cmake b/cmake/mariadb_connector_c.cmake index 6773314313b..fe2bcfa4a1f 100644 --- a/cmake/mariadb_connector_c.cmake +++ b/cmake/mariadb_connector_c.cmake @@ -7,10 +7,8 @@ ENDIF() SET(CONC_WITH_SIGNCODE ${SIGNCODE}) SET(SIGN_OPTIONS ${SIGNTOOL_PARAMETERS}) -IF(TARGET zlib) - GET_PROPERTY(ZLIB_LIBRARY_LOCATION TARGET zlib PROPERTY LOCATION) -ELSE() - SET(ZLIB_LIBRARY_LOCATION ${ZLIB_LIBRARY}) +IF(NOT TARGET zlib) + SET(CONC_WITH_EXTERNAL_ZLIB ON) ENDIF() IF(SSL_DEFINES MATCHES "YASSL") diff --git a/cmake/mysql_version.cmake b/cmake/mysql_version.cmake index 87d61fcf344..02579c9534e 100644 --- a/cmake/mysql_version.cmake +++ b/cmake/mysql_version.cmake @@ -69,13 +69,9 @@ ENDMACRO() # Get mysql version and other interesting variables GET_MYSQL_VERSION() -SET(MYSQL_TCP_PORT_DEFAULT "3306") - +SET(MYSQL_TCP_PORT_DEFAULT 0) IF(NOT MYSQL_TCP_PORT) - SET(MYSQL_TCP_PORT ${MYSQL_TCP_PORT_DEFAULT}) - SET(MYSQL_TCP_PORT_DEFAULT "0") -ELSEIF(MYSQL_TCP_PORT EQUAL MYSQL_TCP_PORT_DEFAULT) - SET(MYSQL_TCP_PORT_DEFAULT "0") + SET(MYSQL_TCP_PORT 3306) ENDIF() IF(NOT COMPILATION_COMMENT) 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() |