summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorHeinz Wiesinger <heinz@m2mobi.com>2017-08-09 21:39:18 +0200
committerVicențiu Ciorbaru <cvicentiu@gmail.com>2021-07-21 10:22:56 +0300
commit751ebe44fda4deb715fc2235548517c287f2a559 (patch)
tree139f857d47d374269307609cd349548406dd73ca /cmake
parent2b017367c785af003fd4d1826c278f6b9dab8084 (diff)
downloadmariadb-git-751ebe44fda4deb715fc2235548517c287f2a559.tar.gz
Add feature summary at the end of cmake.
This gives a short overview over found/missing dependencies as well as enabled/disabled features. Initial author Heinz Wiesinger <heinz@m2mobi.com> Additions by Vicențiu Ciorbaru <vicentiu@mariadb.org> * Report all plugins enabled via MYSQL_ADD_PLUGIN * Simplify code. Eliminate duplication by making use of WITH_xxx variable values to set feature "ON" / "OFF" state. Reviewed by: wlad@mariadb.com (code details) serg@mariadb.com (the idea)
Diffstat (limited to 'cmake')
-rw-r--r--cmake/jemalloc.cmake1
-rw-r--r--cmake/numa.cmake1
-rw-r--r--cmake/plugin.cmake16
-rw-r--r--cmake/readline.cmake2
-rw-r--r--cmake/ssl.cmake1
-rw-r--r--cmake/systemd.cmake1
-rw-r--r--cmake/wsrep.cmake3
7 files changed, 21 insertions, 4 deletions
diff --git a/cmake/jemalloc.cmake b/cmake/jemalloc.cmake
index 5ad636d0e6c..08ab2877c89 100644
--- a/cmake/jemalloc.cmake
+++ b/cmake/jemalloc.cmake
@@ -37,5 +37,6 @@ MACRO (CHECK_JEMALLOC)
IF (NOT LIBJEMALLOC AND NOT WITH_JEMALLOC STREQUAL "auto")
MESSAGE(FATAL_ERROR "jemalloc is not found")
ENDIF()
+ ADD_FEATURE_INFO(JEMALLOC LIBJEMALLOC "Use the JeMalloc memory allocator")
ENDIF()
ENDMACRO()
diff --git a/cmake/numa.cmake b/cmake/numa.cmake
index 4bace0ee7f4..a7b0c0a3392 100644
--- a/cmake/numa.cmake
+++ b/cmake/numa.cmake
@@ -31,6 +31,7 @@ MACRO (MYSQL_CHECK_NUMA)
ENDIF()
ENDIF()
+ ADD_FEATURE_INFO(NUMA HAVE_LIBNUMA "NUMA memory allocation policy")
IF(WITH_NUMA AND NOT HAVE_LIBNUMA)
# Forget it in cache, abort the build.
UNSET(WITH_NUMA CACHE)
diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake
index 68eb715eed9..7a8eb97891e 100644
--- a/cmake/plugin.cmake
+++ b/cmake/plugin.cmake
@@ -49,7 +49,7 @@ MACRO(MYSQL_ADD_PLUGIN)
LIST(REMOVE_AT SOURCES 0)
STRING(TOUPPER ${plugin} plugin)
STRING(TOLOWER ${plugin} target)
-
+
IF (ARG_MANDATORY)
UNSET(PLUGIN_${plugin} CACHE)
SET(PLUGIN_${plugin} "YES")
@@ -110,11 +110,11 @@ MACRO(MYSQL_ADD_PLUGIN)
SET(with_var "WITH_${plugin}")
ENDIF()
UNSET(${with_var} CACHE)
-
+
IF(NOT ARG_DEPENDENCIES)
SET(ARG_DEPENDENCIES)
ENDIF()
-
+
IF(NOT ARG_MODULE_OUTPUT_NAME)
IF(ARG_STORAGE_ENGINE)
SET(ARG_MODULE_OUTPUT_NAME "ha_${target}")
@@ -257,6 +257,16 @@ MACRO(MYSQL_ADD_PLUGIN)
INSTALL_MYSQL_TEST("${CMAKE_CURRENT_SOURCE_DIR}/mysql-test/" "plugin/${subpath}")
ENDIF()
+ GET_TARGET_PROPERTY(plugin_type ${target} TYPE)
+ STRING(REGEX REPLACE "_LIBRARY$" "" plugin_type ${plugin_type})
+ STRING(REGEX REPLACE "^NO$" "" plugin_type ${plugin_type})
+ IF(ARG_STORAGE_ENGINE)
+ ADD_FEATURE_INFO(${plugin} PLUGIN_${plugin} "Storage Engine ${plugin_type}")
+ ELSEIF(ARG_CLIENT)
+ ADD_FEATURE_INFO(${plugin} PLUGIN_${plugin} "Client plugin ${plugin_type}")
+ ELSE()
+ ADD_FEATURE_INFO(${plugin} PLUGIN_${plugin} "Server plugin ${plugin_type}")
+ ENDIF()
ENDIF(NOT WITHOUT_SERVER OR ARG_CLIENT)
ENDMACRO()
diff --git a/cmake/readline.cmake b/cmake/readline.cmake
index f676aeb7838..c423a8a830f 100644
--- a/cmake/readline.cmake
+++ b/cmake/readline.cmake
@@ -52,7 +52,7 @@ MACRO (MYSQL_CHECK_MULTIBYTE)
ENDMACRO()
MACRO (FIND_CURSES)
- FIND_PACKAGE(Curses)
+ FIND_PACKAGE(Curses REQUIRED)
MARK_AS_ADVANCED(CURSES_CURSES_H_PATH CURSES_FORM_LIBRARY CURSES_HAVE_CURSES_H)
IF(NOT CURSES_FOUND)
SET(ERRORMSG "Curses library not found. Please install appropriate package,
diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
index d87d2c8fbd0..1b238826311 100644
--- a/cmake/ssl.cmake
+++ b/cmake/ssl.cmake
@@ -126,6 +126,7 @@ MACRO (MYSQL_CHECK_SSL)
ENDIF()
ENDIF()
FIND_PACKAGE(OpenSSL)
+ SET_PACKAGE_PROPERTIES(OpenSSL PROPERTIES TYPE RECOMMENDED)
IF(OPENSSL_FOUND)
SET(OPENSSL_LIBRARY ${OPENSSL_SSL_LIBRARY})
SET(SSL_SOURCES "")
diff --git a/cmake/systemd.cmake b/cmake/systemd.cmake
index 8a5695a246c..df10d6396df 100644
--- a/cmake/systemd.cmake
+++ b/cmake/systemd.cmake
@@ -63,5 +63,6 @@ MACRO(CHECK_SYSTEMD)
ELSEIF(NOT WITH_SYSTEMD STREQUAL "no")
MESSAGE(FATAL_ERROR "Invalid value for WITH_SYSTEMD. Must be 'yes', 'no', or 'auto'.")
ENDIF()
+ ADD_FEATURE_INFO(SYSTEMD LIBSYSTEMD "Systemd scripts and notification support")
ENDIF()
ENDMACRO()
diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake
index a1e8fc39fca..990198ecf72 100644
--- a/cmake/wsrep.cmake
+++ b/cmake/wsrep.cmake
@@ -41,3 +41,6 @@ SET(WSREP_PROC_INFO ${WITH_WSREP})
IF(WITH_WSREP)
SET(WSREP_PATCH_VERSION "wsrep_${WSREP_VERSION}")
ENDIF()
+IF (NOT WIN32)
+ ADD_FEATURE_INFO(WSREP WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)")
+ENDIF()