summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/libfmt.cmake10
-rw-r--r--cmake/mysql_version.cmake2
-rw-r--r--cmake/os/AIX.cmake3
-rw-r--r--cmake/os/SunOS.cmake4
-rw-r--r--cmake/os/WindowsCache.cmake2
-rw-r--r--cmake/package_name.cmake6
-rw-r--r--cmake/pcre.cmake31
-rw-r--r--cmake/plugin.cmake2
-rw-r--r--cmake/readline.cmake3
9 files changed, 36 insertions, 27 deletions
diff --git a/cmake/libfmt.cmake b/cmake/libfmt.cmake
index 70b6a072..da347942 100644
--- a/cmake/libfmt.cmake
+++ b/cmake/libfmt.cmake
@@ -1,4 +1,4 @@
-INCLUDE (CheckCXXSourceCompiles)
+INCLUDE (CheckCXXSourceRuns)
INCLUDE (ExternalProject)
SET(WITH_LIBFMT "auto" CACHE STRING
@@ -27,17 +27,15 @@ ENDMACRO()
MACRO (CHECK_LIBFMT)
IF(WITH_LIBFMT STREQUAL "system" OR WITH_LIBFMT STREQUAL "auto")
SET(CMAKE_REQUIRED_INCLUDES ${LIBFMT_INCLUDE_DIR})
- CHECK_CXX_SOURCE_COMPILES(
+ CHECK_CXX_SOURCE_RUNS(
"#define FMT_STATIC_THOUSANDS_SEPARATOR ','
#define FMT_HEADER_ONLY 1
#include <fmt/format-inl.h>
- #include <iostream>
int main() {
- int answer= 42;
+ int answer= 4321;
fmt::format_args::format_arg arg=
fmt::detail::make_arg<fmt::format_context>(answer);
- std::cout << fmt::vformat(\"The answer is {}.\",
- fmt::format_args(&arg, 1));
+ return fmt::vformat(\"{:L}\", fmt::format_args(&arg, 1)).compare(\"4,321\");
}" HAVE_SYSTEM_LIBFMT)
SET(CMAKE_REQUIRED_INCLUDES)
ENDIF()
diff --git a/cmake/mysql_version.cmake b/cmake/mysql_version.cmake
index a55c27b4..9f1534a7 100644
--- a/cmake/mysql_version.cmake
+++ b/cmake/mysql_version.cmake
@@ -90,7 +90,7 @@ IF(NOT CPACK_PACKAGE_FILE_NAME)
ENDIF()
SET_IF_UNSET(CPACK_SOURCE_PACKAGE_FILE_NAME "mariadb-${VERSION}")
-SET_IF_UNSET(CPACK_PACKAGE_CONTACT "MariaDB Developers <maria-developers@lists.launchpad.net>")
+SET_IF_UNSET(CPACK_PACKAGE_CONTACT "MariaDB Developers <developers@lists.mariadb.org>")
SET_IF_UNSET(CPACK_PACKAGE_VENDOR "MariaDB Foundation")
SET_IF_UNSET(CPACK_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}
diff --git a/cmake/os/AIX.cmake b/cmake/os/AIX.cmake
index 299b7919..7513c4f4 100644
--- a/cmake/os/AIX.cmake
+++ b/cmake/os/AIX.cmake
@@ -34,5 +34,8 @@ ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -maix64 -pthread -mcmodel=large")
ENDIF()
+# fcntl(fd, F_SETFL, O_DIRECT) is not supported; O_DIRECT is an open(2) flag
+SET(HAVE_FCNTL_DIRECT 0 CACHE INTERNAL "")
+
# make it WARN by default, not AUTO (that implies -Werror)
SET(MYSQL_MAINTAINER_MODE "WARN" CACHE STRING "Enable MariaDB maintainer-specific warnings. One of: NO (warnings are disabled) WARN (warnings are enabled) ERR (warnings are errors) AUTO (warnings are errors in Debug only)")
diff --git a/cmake/os/SunOS.cmake b/cmake/os/SunOS.cmake
index 3a9d2dcc..3d99d347 100644
--- a/cmake/os/SunOS.cmake
+++ b/cmake/os/SunOS.cmake
@@ -17,6 +17,10 @@ INCLUDE(CheckSymbolExists)
INCLUDE(CheckCSourceRuns)
INCLUDE(CheckCSourceCompiles)
+# fcntl(fd, F_SETFL, O_DIRECT) is not supported,
+# and directio(3C) would only work on UFS or NFS, not ZFS.
+SET(HAVE_FCNTL_DIRECT 0 CACHE INTERNAL "")
+
# Enable 64 bit file offsets
SET(_FILE_OFFSET_BITS 64)
diff --git a/cmake/os/WindowsCache.cmake b/cmake/os/WindowsCache.cmake
index 6cd19262..ceb42627 100644
--- a/cmake/os/WindowsCache.cmake
+++ b/cmake/os/WindowsCache.cmake
@@ -44,6 +44,7 @@ SET(HAVE_EXECINFO_H CACHE INTERNAL "")
SET(HAVE_FCHMOD CACHE INTERNAL "")
SET(HAVE_FCNTL CACHE INTERNAL "")
SET(HAVE_FCNTL_H 1 CACHE INTERNAL "")
+SET(HAVE_FCNTL_DIRECT 0 CACHE INTERNAL "")
SET(HAVE_FCNTL_NONBLOCK CACHE INTERNAL "")
SET(HAVE_FDATASYNC CACHE INTERNAL "")
SET(HAVE_DECL_FDATASYNC CACHE INTERNAL "")
@@ -242,7 +243,6 @@ SET(HAVE_TERMCAP_H CACHE INTERNAL "")
SET(HAVE_TERMIOS_H CACHE INTERNAL "")
SET(HAVE_TERMIO_H CACHE INTERNAL "")
SET(HAVE_TERM_H CACHE INTERNAL "")
-SET(HAVE_THR_SETCONCURRENCY CACHE INTERNAL "")
SET(HAVE_THR_YIELD CACHE INTERNAL "")
SET(HAVE_TIME 1 CACHE INTERNAL "")
SET(HAVE_TIMES CACHE INTERNAL "")
diff --git a/cmake/package_name.cmake b/cmake/package_name.cmake
index ff7f5ba7..9c25e426 100644
--- a/cmake/package_name.cmake
+++ b/cmake/package_name.cmake
@@ -102,11 +102,7 @@ IF(NOT VERSION)
SET(DEFAULT_MACHINE "${CMAKE_OSX_ARCHITECTURES}")
ENDIF()
ELSE()
- IF(64BIT)
- SET(DEFAULT_MACHINE "x86_64")
- ELSE()
- SET(DEFAULT_MACHINE "i386")
- ENDIF()
+ SET(DEFAULT_MACHINE ${CMAKE_SYSTEM_PROCESSOR})
ENDIF()
IF(DEFAULT_MACHINE MATCHES "i386")
diff --git a/cmake/pcre.cmake b/cmake/pcre.cmake
index 65dc2ae2..3c427b88 100644
--- a/cmake/pcre.cmake
+++ b/cmake/pcre.cmake
@@ -1,4 +1,3 @@
-INCLUDE (CheckCSourceRuns)
INCLUDE (ExternalProject)
SET(WITH_PCRE "auto" CACHE STRING
@@ -6,7 +5,8 @@ SET(WITH_PCRE "auto" CACHE STRING
MACRO(BUNDLE_PCRE2)
SET(dir "${CMAKE_BINARY_DIR}/extra/pcre2")
- SET(PCRE_INCLUDES ${dir}/src/pcre2-build ${dir}/src/pcre2/src)
+ SET(PCRE_INCLUDE_DIRS ${dir}/src/pcre2-build ${dir}/src/pcre2/src)
+ MESSAGE(STATUS "Will download and bundle pcre2")
SET(byproducts)
FOREACH(lib pcre2-posix pcre2-8)
ADD_LIBRARY(${lib} STATIC IMPORTED GLOBAL)
@@ -76,18 +76,23 @@ SET_TARGET_PROPERTIES(pcre2 PROPERTIES EXCLUDE_FROM_ALL TRUE)
ENDMACRO()
MACRO (CHECK_PCRE)
- IF(WITH_PCRE STREQUAL "system" OR WITH_PCRE STREQUAL "auto")
- CHECK_LIBRARY_EXISTS(pcre2-8 pcre2_match_8 "" HAVE_PCRE2)
- ENDIF()
- IF(NOT HAVE_PCRE2 OR WITH_PCRE STREQUAL "bundled")
- IF (WITH_PCRE STREQUAL "system")
- MESSAGE(FATAL_ERROR "system pcre2-8 library is not found or unusable")
+ IF (NOT TARGET pcre2 AND NOT PCRE_FOUND)
+ IF(WITH_PCRE STREQUAL "system" OR WITH_PCRE STREQUAL "auto")
+ FIND_PACKAGE(PkgConfig QUIET)
+ PKG_CHECK_MODULES(PCRE libpcre2-8)
+ # in case pkg-config or libpcre2-8.pc is not installed:
+ CHECK_LIBRARY_EXISTS(pcre2-8 pcre2_match_8 "${PCRE_LIBRARY_DIRS}" HAVE_PCRE2_MATCH_8)
ENDIF()
- BUNDLE_PCRE2()
- ELSE()
- CHECK_LIBRARY_EXISTS(pcre2-posix PCRE2regcomp "" NEEDS_PCRE2_DEBIAN_HACK)
- IF(NEEDS_PCRE2_DEBIAN_HACK)
- SET(PCRE2_DEBIAN_HACK "-Dregcomp=PCRE2regcomp -Dregexec=PCRE2regexec -Dregerror=PCRE2regerror -Dregfree=PCRE2regfree")
+ IF(NOT HAVE_PCRE2_MATCH_8 OR WITH_PCRE STREQUAL "bundled")
+ IF (WITH_PCRE STREQUAL "system")
+ MESSAGE(FATAL_ERROR "system pcre2-8 library is not found or unusable")
+ ENDIF()
+ BUNDLE_PCRE2()
+ ELSE()
+ CHECK_LIBRARY_EXISTS(pcre2-posix PCRE2regcomp "${PCRE_LIBRARY_DIRS}" NEEDS_PCRE2_DEBIAN_HACK)
+ IF(NEEDS_PCRE2_DEBIAN_HACK)
+ SET(PCRE2_DEBIAN_HACK "-Dregcomp=PCRE2regcomp -Dregexec=PCRE2regexec -Dregerror=PCRE2regerror -Dregfree=PCRE2regfree")
+ ENDIF()
ENDIF()
ENDIF()
ENDMACRO()
diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake
index 813d8ef6..6efd40fd 100644
--- a/cmake/plugin.cmake
+++ b/cmake/plugin.cmake
@@ -44,7 +44,7 @@ MACRO(MYSQL_ADD_PLUGIN)
# Add common include directories
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/sql
- ${PCRE_INCLUDES}
+ ${PCRE_INCLUDE_DIRS}
${SSL_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR})
diff --git a/cmake/readline.cmake b/cmake/readline.cmake
index 9c35d8c7..55a2867d 100644
--- a/cmake/readline.cmake
+++ b/cmake/readline.cmake
@@ -114,6 +114,9 @@ MACRO (MYSQL_FIND_SYSTEM_READLINE)
{
rl_completion_func_t *func1= (rl_completion_func_t*)0;
rl_compentry_func_t *func2= (rl_compentry_func_t*)0;
+ rl_on_new_line();
+ rl_replace_line(\"\", 0);
+ rl_redisplay();
}"
NEW_READLINE_INTERFACE)