diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-09-01 22:00:26 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-09-04 10:32:02 +0200 |
commit | a0114b86274258af56803f6b6001174cc52eb26f (patch) | |
tree | 0199fdd45096daf26a9ecf6837d746417cf4b31e | |
parent | e74f91dfd7986a63e73e72b8a1fbeaa2822d8f1e (diff) | |
download | mariadb-git-a0114b86274258af56803f6b6001174cc52eb26f.tar.gz |
cmake: don't repeat yourself
make repeated cmake runs less verbose:
* remove few not very useful MESSAGE's
* only run pkg_check_modules() if there's no cached result
* only print QQGraph messages on the first run
-rw-r--r-- | cmake/ssl.cmake | 1 | ||||
-rw-r--r-- | storage/connect/CMakeLists.txt | 4 | ||||
-rw-r--r-- | storage/mroonga/vendor/groonga/CMakeLists.txt | 16 | ||||
-rw-r--r-- | storage/oqgraph/CMakeLists.txt | 19 |
4 files changed, 25 insertions, 15 deletions
diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake index 1926f8b1b8e..802cc2c32ee 100644 --- a/cmake/ssl.cmake +++ b/cmake/ssl.cmake @@ -147,7 +147,6 @@ MACRO (MYSQL_CHECK_SSL) IF (WITH_SSL_PATH) LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES) ENDIF() - MESSAGE(STATUS "suffixes <${CMAKE_FIND_LIBRARY_SUFFIXES}>") FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 ssleay32MD HINTS ${OPENSSL_ROOT_DIR}/lib) diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt index 02fe5ee8dad..2de00db1bfd 100644 --- a/storage/connect/CMakeLists.txt +++ b/storage/connect/CMakeLists.txt @@ -48,7 +48,7 @@ IF(UNIX) # Bar: -Wfatal-errors removed (does not present in gcc on solaris10) if(WITH_WARNINGS) add_definitions(-Wall -Wextra -Wmissing-declarations) - message(STATUS "CONNECT: GCC: All warnings enabled") + #message(STATUS "CONNECT: GCC: All warnings enabled") else() add_definitions(-Wall -Wmissing-declarations) add_definitions(-Wno-write-strings) @@ -69,7 +69,7 @@ IF(UNIX) # These switches are for C++ only # add_definitions(-Wno-reorder) - message(STATUS "CONNECT: GCC: Some warnings disabled") + #message(STATUS "CONNECT: GCC: Some warnings disabled") endif(WITH_WARNINGS) add_definitions( -DUNIX -DLINUX -DUBUNTU ) diff --git a/storage/mroonga/vendor/groonga/CMakeLists.txt b/storage/mroonga/vendor/groonga/CMakeLists.txt index e0652982e73..625a65b48d0 100644 --- a/storage/mroonga/vendor/groonga/CMakeLists.txt +++ b/storage/mroonga/vendor/groonga/CMakeLists.txt @@ -341,7 +341,9 @@ endif() set(GRN_WITH_LZ4 "auto" CACHE STRING "Support data compression by LZ4.") if(NOT ${GRN_WITH_LZ4} STREQUAL "no") - pkg_check_modules(LIBLZ4 liblz4) + if(NOT DEFINED LIBLZ4_FOUND) + pkg_check_modules(LIBLZ4 liblz4) + endif() if(LIBLZ4_FOUND) set(GRN_WITH_LZ4 TRUE) else() @@ -392,7 +394,9 @@ endif() set(GRN_WITH_KYTEA "auto" CACHE STRING "use KyTea for morphological analysis") if(NOT ${GRN_WITH_KYTEA} STREQUAL "no") - pkg_check_modules(KYTEA kytea) + if(NOT DEFINED KYTEA_FOUND) + pkg_check_modules(KYTEA kytea) + endif() if(KYTEA_FOUND) set(GRN_WITH_KYTEA TRUE) else() @@ -440,7 +444,9 @@ endif() set(GRN_WITH_ZEROMQ "auto" CACHE STRING "use ZeroMQ for suggestion") if(NOT ${GRN_WITH_ZEROMQ} STREQUAL "no") - pkg_check_modules(ZEROMQ libzmq) + if(NOT DEFINED ZEROMQ_FOUND) + pkg_check_modules(ZEROMQ libzmq) + endif() if(ZEROMQ_FOUND) set(GRN_WITH_ZEROMQ TRUE) else() @@ -483,7 +489,9 @@ endif() set(GRN_WITH_MESSAGE_PACK "auto" CACHE STRING "use MessagePack for suggestion") if(NOT ${GRN_WITH_MESSAGE_PACK} STREQUAL "no") - pkg_check_modules(MESSAGE_PACK msgpack) + if(NOT DEFINED MESSAGE_PACK_FOUND) + pkg_check_modules(MESSAGE_PACK msgpack) + endif() if(MESSAGE_PACK_FOUND) set(GRN_WITH_MESSAGE_PACK TRUE) else() diff --git a/storage/oqgraph/CMakeLists.txt b/storage/oqgraph/CMakeLists.txt index 1cb5c828d92..772a8f61bd5 100644 --- a/storage/oqgraph/CMakeLists.txt +++ b/storage/oqgraph/CMakeLists.txt @@ -5,6 +5,7 @@ MESSAGE(STATUS "Configuring OQGraph") FIND_PACKAGE(Boost 1.40.0) IF(NOT Boost_FOUND) MESSAGE(STATUS "Boost not found. OQGraph will not be compiled") + SET(OQGRAPH_OK 0 CACHE INTERNAL "") RETURN() ENDIF() INCLUDE_DIRECTORIES(BEFORE ${Boost_INCLUDE_DIRS}) @@ -12,6 +13,7 @@ INCLUDE_DIRECTORIES(BEFORE ${Boost_INCLUDE_DIRS}) FIND_PACKAGE(Judy) IF(NOT Judy_FOUND) MESSAGE(STATUS "Judy not found. OQGraph will not be compiled") + SET(OQGRAPH_OK 0 CACHE INTERNAL "") RETURN() ENDIF() INCLUDE_DIRECTORIES(${Judy_INCLUDE_DIR}) @@ -19,9 +21,9 @@ INCLUDE_DIRECTORIES(${Judy_INCLUDE_DIR}) IF(MSVC) # # lp:756966 OQGRAPH on Win64 does not compile # IF (CMAKE_SIZEOF_VOID_P EQUAL 8) -# SET(BOOST_OK 0) +# SET(OQGRAPH_OK 0 CACHE INTERNAL "") # ELSE() - SET(BOOST_OK 1) + SET(OQGRAPH_OK 1 CACHE INTERNAL "") # ENDIF() ELSE() # See if that works. On old gcc it'll fail because of -fno-rtti @@ -33,10 +35,10 @@ CHECK_CXX_SOURCE_COMPILES( #include <boost/config.hpp> #include <boost/property_map/property_map.hpp> int main() { return 0; } -" BOOST_OK) +" OQGRAPH_OK) ENDIF() -IF(BOOST_OK) +IF(OQGRAPH_OK) ADD_DEFINITIONS(-DHAVE_OQGRAPH) IF(MSVC) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc" PARENT_SCOPE) @@ -50,7 +52,6 @@ IF(BOOST_OK) ENDIF(MSVC) ADD_DEFINITIONS(-DBOOST_NO_RTTI=1 -DBOOST_NO_TYPEID=1 -DBOOST_DISABLE_ASSERTS=1) - MESSAGE(STATUS "OQGraph OK") MYSQL_ADD_PLUGIN(oqgraph ha_oqgraph.cc graphcore.cc graphcore-graph.cc oqgraph_shim.cc oqgraph_thunk.cc oqgraph_judy.cc STORAGE_ENGINE @@ -58,9 +59,11 @@ IF(BOOST_OK) RECOMPILE_FOR_EMBEDDED COMPONENT oqgraph-engine LINK_LIBRARIES ${Judy_LIBRARIES}) -ELSE(BOOST_OK) +ELSE(OQGRAPH_OK) MESSAGE(STATUS "Requisites for OQGraph not met. OQGraph will not be compiled") -ENDIF(BOOST_OK) +ENDIF(OQGRAPH_OK) ENDFUNCTION() -CHECK_OQGRAPH() +IF(NOT DEFINED OQGRAPH_OK) + CHECK_OQGRAPH() +ENDIF() |