diff options
author | Heinz Wiesinger <heinz@m2mobi.com> | 2017-08-09 21:39:18 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <cvicentiu@gmail.com> | 2021-07-21 10:22:56 +0300 |
commit | 751ebe44fda4deb715fc2235548517c287f2a559 (patch) | |
tree | 139f857d47d374269307609cd349548406dd73ca /storage | |
parent | 2b017367c785af003fd4d1826c278f6b9dab8084 (diff) | |
download | mariadb-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 'storage')
-rw-r--r-- | storage/connect/CMakeLists.txt | 23 | ||||
-rw-r--r-- | storage/innobase/bzip2.cmake | 5 | ||||
-rw-r--r-- | storage/innobase/innodb.cmake | 13 | ||||
-rw-r--r-- | storage/innobase/lz4.cmake | 6 | ||||
-rw-r--r-- | storage/innobase/lzma.cmake | 4 | ||||
-rw-r--r-- | storage/innobase/lzo.cmake | 4 | ||||
-rw-r--r-- | storage/innobase/snappy.cmake | 4 | ||||
-rw-r--r-- | storage/oqgraph/CMakeLists.txt | 8 | ||||
-rw-r--r-- | storage/rocksdb/CMakeLists.txt | 1 | ||||
-rw-r--r-- | storage/rocksdb/build_rocksdb.cmake | 9 |
10 files changed, 68 insertions, 9 deletions
diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt index d3632b689fe..f991726634d 100644 --- a/storage/connect/CMakeLists.txt +++ b/storage/connect/CMakeLists.txt @@ -108,6 +108,7 @@ IF(CONNECT_WITH_VCT) SET(CONNECT_SOURCES ${CONNECT_SOURCES} filamvct.cpp tabvct.cpp filamvct.h tabvct.h) add_definitions(-DVCT_SUPPORT) ENDIF(CONNECT_WITH_VCT) +ADD_FEATURE_INFO(CONNECT_VCT CONNECT_WITH_VCT "Support for VCT in the CONNECT storage engine") # @@ -133,6 +134,7 @@ IF(CONNECT_WITH_LIBXML2) D:/libxml/lib) ENDIF(WIN32) FIND_PACKAGE(LibXml2) + SET_PACKAGE_PROPERTIES(LibXml2 PROPERTIES TYPE OPTIONAL) IF (LIBXML2_FOUND) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) SET(XML_LIBRARY ${LIBXML2_LIBRARIES}) @@ -140,6 +142,8 @@ IF(CONNECT_WITH_LIBXML2) add_definitions(-DLIBXML2_SUPPORT) ENDIF(LIBXML2_FOUND) ENDIF(CONNECT_WITH_LIBXML2) +ADD_FEATURE_INFO(CONNECT_LIBXML2 CONNECT_WITH_LIBXML2 + "Support for LIBXML2 in the CONNECT storage engine") IF(WIN32) @@ -153,6 +157,8 @@ IF(WIN32) SET(MSXML_FOUND 1) SET(CONNECT_SOURCES ${CONNECT_SOURCES} domdoc.cpp domdoc.h) ENDIF(CONNECT_WITH_MSXML) + ADD_FEATURE_INFO(CONNECT_MSXML CONNECT_WITH_MSXML + "Support for MSXML in the CONNECT storage engine") ENDIF(WIN32) IF(LIBXML2_FOUND OR MSXML_FOUND) @@ -253,6 +259,7 @@ int main() { tabodbc.cpp tabodbc.h odbccat.h odbconn.cpp odbconn.h) ENDIF(UNIX) ENDIF(CONNECT_WITH_ODBC) +ADD_FEATURE_INFO(CONNECT_ODBC ODBC_LIBRARY "Support for ODBC in the CONNECT storage engine") # # JDBC with MongoDB Java Driver included but disabled if without MONGO @@ -262,7 +269,9 @@ OPTION(CONNECT_WITH_JDBC "Compile CONNECT storage engine with JDBC support" ON) IF(CONNECT_WITH_JDBC) FIND_PACKAGE(Java 1.6) + SET_PACKAGE_PROPERTIES(Java PROPERTIES TYPE OPTIONAL) FIND_PACKAGE(JNI) + SET_PACKAGE_PROPERTIES(JNI PROPERTIES TYPE OPTIONAL) IF (JAVA_FOUND AND JNI_FOUND) INCLUDE(UseJava) INCLUDE_DIRECTORIES(${JAVA_INCLUDE_PATH}) @@ -278,6 +287,7 @@ IF(CONNECT_WITH_JDBC) Mongo2Interface.java Mongo3Interface.java mysql-test/connect/std_data/JavaWrappers.jar) add_definitions(-DJAVA_SUPPORT) + ADD_FEATURE_INFO(CONNECT_JDBC "ON" "Support for JDBC in the CONNECT storage engine") IF(CONNECT_WITH_MONGO) SET(CONNECT_SOURCES ${CONNECT_SOURCES} mysql-test/connect/std_data/Mongo2.jar @@ -286,7 +296,10 @@ IF(CONNECT_WITH_JDBC) ENDIF() ELSE() SET(JDBC_LIBRARY "") + ADD_FEATURE_INFO(CONNECT_JDBC "OFF" "Support for JDBC in the CONNECT storage engine") ENDIF() +ELSE(CONNECT_WITH_JDBC) + ADD_FEATURE_INFO(CONNECT_JDBC "OFF" "Support for JDBC in the CONNECT storage engine") ENDIF(CONNECT_WITH_JDBC) # @@ -300,6 +313,7 @@ IF(CONNECT_WITH_ZIP) filamzip.h tabzip.h ioapi.h unzip.h zip.h) add_definitions(-DZIP_SUPPORT -DNOCRYPT) ENDIF(CONNECT_WITH_ZIP) +ADD_FEATURE_INFO(CONNECT_ZIP CONNECT_WITH_ZIP "Support for ZIP in the CONNECT storage engine") # # MONGO C Driver @@ -316,6 +330,7 @@ IF(CONNECT_WITH_MONGO) D:/mongo-c-driver/lib) ENDIF(WIN32) FIND_PACKAGE(libmongoc-1.0 1.7 QUIET) + SET_PACKAGE_PROPERTIES(libmongoc PROPERTIES TYPE OPTIONAL) IF (libmongoc-1.0_FOUND) INCLUDE_DIRECTORIES(${MONGOC_INCLUDE_DIRS}) SET(MONGOC_LIBRARY ${MONGOC_LIBRARIES}) @@ -323,14 +338,18 @@ IF(CONNECT_WITH_MONGO) cmgoconn.cpp cmgfam.cpp tabcmg.cpp cmgoconn.h cmgfam.h tabcmg.h) add_definitions(-DCMGO_SUPPORT) + ADD_FEATURE_INFO(CONNECT_MONGODB "ON" "Support for MongoDB in the CONNECT storage engine") IF (NOT JAVA_FOUND AND JNI_FOUND) SET(CONNECT_SOURCES ${CONNECT_SOURCES} mongo.cpp mongo.h) add_definitions(-DMONGO_SUPPORT) ENDIF (NOT JAVA_FOUND AND JNI_FOUND) + ELSE(libmongoc-1.0_FOUND) + ADD_FEATURE_INFO(CONNECT_MONGODB "OFF" "Support for MongoDB in the CONNECT storage engine") ENDIF(libmongoc-1.0_FOUND) +ELSE(CONNECT_WITH_MONGO) + ADD_FEATURE_INFO(CONNECT_MONGODB "OFF" "Support for MongoDB in the CONNECT storage engine") ENDIF(CONNECT_WITH_MONGO) - # # REST # @@ -362,6 +381,7 @@ IF(CONNECT_WITH_REST) ## MESSAGE(STATUS "=====> cpprestsdk package not found") # ENDIF (cpprestsdk_FOUND) ENDIF(CONNECT_WITH_REST) +ADD_FEATURE_INFO(CONNECT_REST CONNECT_WITH_REST "Support for REST API in the CONNECT storage engine") # # XMAP @@ -372,6 +392,7 @@ OPTION(CONNECT_WITH_XMAP "Compile CONNECT storage engine with index file mapping IF(CONNECT_WITH_XMAP) add_definitions(-DXMAP) ENDIF(CONNECT_WITH_XMAP) +ADD_FEATURE_INFO(CONNECT_XMAP CONNECT_WITH_XMAP "Support for index file mapping in the CONNECT storage engine") # # Plugin definition diff --git a/storage/innobase/bzip2.cmake b/storage/innobase/bzip2.cmake index 26fd703120e..91dd2bf0fcd 100644 --- a/storage/innobase/bzip2.cmake +++ b/storage/innobase/bzip2.cmake @@ -22,12 +22,15 @@ MACRO (MYSQL_CHECK_BZIP2) CHECK_LIBRARY_EXISTS(bz2 BZ2_bzBuffToBuffDecompress "" HAVE_BZLIB2_DECOMPRESS) IF (HAVE_BZLIB2_COMPRESS AND HAVE_BZLIB2_DECOMPRESS AND HAVE_BZLIB2_H) + SET(HAVE_INNODB_BZLIB2 TRUE) ADD_DEFINITIONS(-DHAVE_BZIP2=1) LINK_LIBRARIES(bz2) ELSE() IF (WITH_INNODB_BZIP2 STREQUAL "ON") - MESSAGE(FATAL_ERROR "Required bzip2 library is not found") + MESSAGE(FATAL_ERROR "Required bzip2 library is not found") ENDIF() ENDIF() ENDIF() + ADD_FEATURE_INFO(INNODB_BZIP2 HAVE_INNODB_BZLIB2 + "BZIP2 compression in the InnoDB storage engine") ENDMACRO() diff --git a/storage/innobase/innodb.cmake b/storage/innobase/innodb.cmake index 523176b4530..e2e74951f67 100644 --- a/storage/innobase/innodb.cmake +++ b/storage/innobase/innodb.cmake @@ -86,6 +86,7 @@ MARK_AS_ADVANCED(INNODB_COMPILER_HINTS) IF(INNODB_COMPILER_HINTS) ADD_DEFINITIONS("-DCOMPILER_HINTS") ENDIF() +ADD_FEATURE_INFO(INNODB_COMPILER_HINTS INNODB_COMPILER_HINTS "InnoDB compiled with compiler hints") SET(MUTEXTYPE "event" CACHE STRING "Mutex type: event, sys or futex") @@ -121,15 +122,20 @@ IF(WITH_INNODB_AHI) ADD_DEFINITIONS(-DBTR_CUR_HASH_ADAPT -DBTR_CUR_ADAPT) IF(NOT WITH_INNODB_ROOT_GUESS) MESSAGE(WARNING "WITH_INNODB_AHI implies WITH_INNODB_ROOT_GUESS") + SET(WITH_INNODB_ROOT_GUESS ON) ENDIF() ELSEIF(WITH_INNODB_ROOT_GUESS) ADD_DEFINITIONS(-DBTR_CUR_ADAPT) ENDIF() +ADD_FEATURE_INFO(INNODB_AHI WITH_INNODB_AHI "InnoDB Adaptive Hash Index") +ADD_FEATURE_INFO(INNODB_ROOT_GUESS WITH_INNODB_ROOT_GUESS + "Cache index root block descriptors in InnoDB") OPTION(WITH_INNODB_BUG_ENDIAN_CRC32 "Weaken innodb_checksum_algorithm=crc32 by supporting upgrade from big-endian systems running 5.6/10.0/10.1" ${IS_BIG_ENDIAN}) IF(WITH_INNODB_BUG_ENDIAN_CRC32) ADD_DEFINITIONS(-DINNODB_BUG_ENDIAN_CRC32) ENDIF() +ADD_FEATURE_INFO(INNODB_BUG_ENDIAN_CRC32 WITH_INNODB_BUG_ENDIAN_CRC32 "Big endian weaker CRC32 to support upgrade from big-endian systems running 5.6/10.0/10.1") OPTION(WITH_INNODB_EXTRA_DEBUG "Enable extra InnoDB debug checks" OFF) IF(WITH_INNODB_EXTRA_DEBUG) @@ -148,6 +154,8 @@ IF(WITH_INNODB_EXTRA_DEBUG) SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${EXTRA_DEBUG_FLAGS}") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${EXTRA_DEBUG_FLAGS}") ENDIF() +ADD_FEATURE_INFO(INNODB_EXTRA_DEBUG WITH_INNODB_EXTRA_DEBUG "Extra InnoDB debug checks") + CHECK_FUNCTION_EXISTS(sched_getcpu HAVE_SCHED_GETCPU) IF(HAVE_SCHED_GETCPU) @@ -239,6 +247,7 @@ OPTION(WITH_INNODB_DISALLOW_WRITES "InnoDB freeze writes patch from Google" ${WI IF (WITH_INNODB_DISALLOW_WRITES) ADD_DEFINITIONS(-DWITH_INNODB_DISALLOW_WRITES) ENDIF() +ADD_FEATURE_INFO(INNODB_DISALLOW_WRITES WITH_INNODB_DISALLOW_WRITES "Expose innodb_disallow_writes switch to stop innodb from writing to disk") # Include directories under innobase @@ -281,8 +290,8 @@ IF(MSVC) SET_SOURCE_FILES_PROPERTIES(${_SRC_DIR}/pars/lexyy.c PROPERTIES COMPILE_FLAGS "/wd4003") ENDIF() - + # Include directories under innobase INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/storage/innobase/include - ${CMAKE_SOURCE_DIR}/storage/innobase/handler + ${CMAKE_SOURCE_DIR}/storage/innobase/handler ${CMAKE_SOURCE_DIR}/libbinlogevents/include ) diff --git a/storage/innobase/lz4.cmake b/storage/innobase/lz4.cmake index 2f2f0441774..a908dd3b73e 100644 --- a/storage/innobase/lz4.cmake +++ b/storage/innobase/lz4.cmake @@ -22,15 +22,17 @@ MACRO (MYSQL_CHECK_LZ4) CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_default "" HAVE_LZ4_COMPRESS_DEFAULT) IF (HAVE_LZ4_SHARED_LIB AND HAVE_LZ4_H) + SET(HAVE_INNODB_LZ4 TRUE) ADD_DEFINITIONS(-DHAVE_LZ4=1) IF (HAVE_LZ4_COMPRESS_DEFAULT) - ADD_DEFINITIONS(-DHAVE_LZ4_COMPRESS_DEFAULT=1) + ADD_DEFINITIONS(-DHAVE_LZ4_COMPRESS_DEFAULT=1) ENDIF() LINK_LIBRARIES(lz4) ELSE() IF (WITH_INNODB_LZ4 STREQUAL "ON") - MESSAGE(FATAL_ERROR "Required lz4 library is not found") + MESSAGE(FATAL_ERROR "Required lz4 library is not found") ENDIF() ENDIF() ENDIF() + ADD_FEATURE_INFO(INNODB_LZ4 HAVE_INNODB_LZ4 "LZ4 compression in the InnoDB storage engine") ENDMACRO() diff --git a/storage/innobase/lzma.cmake b/storage/innobase/lzma.cmake index 93de0a2934d..3060139c27c 100644 --- a/storage/innobase/lzma.cmake +++ b/storage/innobase/lzma.cmake @@ -22,12 +22,14 @@ MACRO (MYSQL_CHECK_LZMA) CHECK_LIBRARY_EXISTS(lzma lzma_easy_buffer_encode "" HAVE_LZMA_ENCODE) IF (HAVE_LZMA_DECODE AND HAVE_LZMA_ENCODE AND HAVE_LZMA_H) + SET(HAVE_INNODB_LZMA TRUE) ADD_DEFINITIONS(-DHAVE_LZMA=1) LINK_LIBRARIES(lzma) ELSE() IF (WITH_INNODB_LZMA STREQUAL "ON") - MESSAGE(FATAL_ERROR "Required lzma library is not found") + MESSAGE(FATAL_ERROR "Required lzma library is not found") ENDIF() ENDIF() ENDIF() + ADD_FEATURE_INFO(INNODB_LZMA HAVE_INNODB_LZMA "LZMA compression in the InnoDB storage engine") ENDMACRO() diff --git a/storage/innobase/lzo.cmake b/storage/innobase/lzo.cmake index ef6cc52c35d..ca2de6ab1c5 100644 --- a/storage/innobase/lzo.cmake +++ b/storage/innobase/lzo.cmake @@ -21,12 +21,14 @@ MACRO (MYSQL_CHECK_LZO) CHECK_LIBRARY_EXISTS(lzo2 lzo1x_1_compress "" HAVE_LZO_SHARED_LIB) IF(HAVE_LZO_SHARED_LIB AND HAVE_LZO_H) + SET(HAVE_INNODB_LZO TRUE) ADD_DEFINITIONS(-DHAVE_LZO=1) LINK_LIBRARIES(lzo2) ELSE() IF (WITH_INNODB_LZO STREQUAL "ON") - MESSAGE(FATAL_ERROR "Required lzo library is not found") + MESSAGE(FATAL_ERROR "Required lzo library is not found") ENDIF() ENDIF() ENDIF() + ADD_FEATURE_INFO(INNODB_LZO HAVE_INNODB_LZO "LZO compression in the InnoDB storage engine") ENDMACRO() diff --git a/storage/innobase/snappy.cmake b/storage/innobase/snappy.cmake index 2810472cef6..3a2d828ee5c 100644 --- a/storage/innobase/snappy.cmake +++ b/storage/innobase/snappy.cmake @@ -21,12 +21,14 @@ MACRO (MYSQL_CHECK_SNAPPY) CHECK_LIBRARY_EXISTS(snappy snappy_uncompress "" HAVE_SNAPPY_SHARED_LIB) IF(HAVE_SNAPPY_SHARED_LIB AND HAVE_SNAPPY_H) + SET(HAVE_INNODB_SNAPPY TRUE) ADD_DEFINITIONS(-DHAVE_SNAPPY=1) LINK_LIBRARIES(snappy) ELSE() IF (WITH_INNODB_SNAPPY STREQUAL "ON") - MESSAGE(FATAL_ERROR "Required snappy library is not found") + MESSAGE(FATAL_ERROR "Required snappy library is not found") ENDIF() ENDIF() ENDIF() + ADD_FEATURE_INFO(INNODB_SNAPPY HAVE_INNODB_SNAPPY "Snappy compression in the InnoDB storage engine") ENDMACRO() diff --git a/storage/oqgraph/CMakeLists.txt b/storage/oqgraph/CMakeLists.txt index 3be197f7106..9770820f0b7 100644 --- a/storage/oqgraph/CMakeLists.txt +++ b/storage/oqgraph/CMakeLists.txt @@ -3,6 +3,10 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") FUNCTION(CHECK_OQGRAPH) MESSAGE(STATUS "Configuring OQGraph") FIND_PACKAGE(Boost 1.40.0) +SET_PACKAGE_PROPERTIES(Boost PROPERTIES + PURPOSE "Required for the OQGraph storage engine" + TYPE OPTIONAL +) IF(NOT Boost_FOUND) MESSAGE(STATUS "Boost not found. OQGraph will not be compiled") SET(OQGRAPH_OK 0 CACHE INTERNAL "") @@ -11,6 +15,10 @@ ENDIF() INCLUDE_DIRECTORIES(BEFORE ${Boost_INCLUDE_DIRS}) FIND_PACKAGE(Judy) +SET_PACKAGE_PROPERTIES(Judy PROPERTIES + PURPOSE "Required for the OQGraph storage engine" + TYPE OPTIONAL +) IF(NOT Judy_FOUND) MESSAGE(STATUS "Judy not found. OQGraph will not be compiled") SET(OQGRAPH_OK 0 CACHE INTERNAL "") diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt index f9384848243..e2b0d9df547 100644 --- a/storage/rocksdb/CMakeLists.txt +++ b/storage/rocksdb/CMakeLists.txt @@ -2,6 +2,7 @@ MACRO(SKIP_ROCKSDB_PLUGIN msg) MESSAGE_ONCE(SKIP_ROCKSDB_PLUGIN "Can't build rocksdb engine - ${msg}") + ADD_FEATURE_INFO(ROCKSDB "OFF" "Storage Engine") RETURN() ENDMACRO() diff --git a/storage/rocksdb/build_rocksdb.cmake b/storage/rocksdb/build_rocksdb.cmake index 883ee15f74c..b1937344b9f 100644 --- a/storage/rocksdb/build_rocksdb.cmake +++ b/storage/rocksdb/build_rocksdb.cmake @@ -48,22 +48,28 @@ foreach(compression_lib LZ4 BZip2 ZSTD snappy) endforeach() if(LZ4_FOUND AND (NOT WITH_ROCKSDB_LZ4 STREQUAL "OFF")) + set(HAVE_ROCKSDB_LZ4 TRUE) add_definitions(-DLZ4) include_directories(${LZ4_INCLUDE_DIR}) list(APPEND THIRDPARTY_LIBS ${LZ4_LIBRARY}) endif() +ADD_FEATURE_INFO(ROCKSDB_LZ4 HAVE_ROCKSDB_LZ4 "LZ4 Compression in the RocksDB storage engine") if(BZIP2_FOUND AND (NOT WITH_ROCKSDB_BZip2 STREQUAL "OFF")) + set(HAVE_ROCKSDB_BZIP2 TRUE) add_definitions(-DBZIP2) include_directories(${BZIP2_INCLUDE_DIR}) list(APPEND THIRDPARTY_LIBS ${BZIP2_LIBRARIES}) endif() +ADD_FEATURE_INFO(ROCKSDB_BZIP2 HAVE_ROCKSDB_BZIP2 "BZIP2 Compression in the RocksDB storage engine") if(SNAPPY_FOUND AND (NOT WITH_ROCKSDB_snappy STREQUAL "OFF")) + set(HAVE_ROCKSDB_SNAPPY TRUE) add_definitions(-DSNAPPY) include_directories(${snappy_INCLUDE_DIR}) list(APPEND THIRDPARTY_LIBS ${snappy_LIBRARIES}) endif() +ADD_FEATURE_INFO(ROCKSDB_SNAPPY HAVE_ROCKSDB_SNAPPY "Snappy Compression in the RocksDB storage engine") include(CheckFunctionExists) if(ZSTD_FOUND AND (NOT WITH_ROCKSDB_ZSTD STREQUAL "OFF")) @@ -75,14 +81,17 @@ if(ZSTD_FOUND AND (NOT WITH_ROCKSDB_ZSTD STREQUAL "OFF")) "WITH_ROCKSDB_ZSTD is ON and ZSTD library was found, but the version needs to be >= 1.1.3") endif() if (ZSTD_VALID) + set(HAVE_ROCKSDB_ZSTD TRUE) add_definitions(-DZSTD) include_directories(${ZSTD_INCLUDE_DIR}) list(APPEND THIRDPARTY_LIBS ${ZSTD_LIBRARY}) endif() endif() +ADD_FEATURE_INFO(ROCKSDB_ZSTD HAVE_ROCKSDB_ZSTD "Zstandard Compression in the RocksDB storage engine") add_definitions(-DZLIB) list(APPEND THIRDPARTY_LIBS ${ZLIB_LIBRARY}) +ADD_FEATURE_INFO(ROCKSDB_ZLIB "ON" "zlib Compression in the RocksDB storage engine") if(CMAKE_SYSTEM_NAME MATCHES "Cygwin") add_definitions(-fno-builtin-memcmp -DCYGWIN) |