From 334ac7029a1b82f3f80ad4d107c270f1d73c6844 Mon Sep 17 00:00:00 2001 From: stfx Date: Wed, 2 Sep 2015 22:30:59 +0200 Subject: [PATCH] Add separate cmake file to show configuration options [ci skip] (based on cmangos/mangos-wotlk@7e9bf06) Signed-off-by: stfx --- CMakeLists.txt | 39 ++------------------------------ cmake/showoptions.cmake | 50 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 37 deletions(-) create mode 100644 cmake/showoptions.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index bc9b1c1877..d15c8d72bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -184,9 +184,6 @@ else() set(GIT_REVISION "Git not found") endif() -message(STATUS "MaNGOS-Core revision : ${GIT_REVISION}") -message(STATUS "Install server to : ${CMAKE_INSTALL_PREFIX}") - if(DEFINED INCLUDE_BINDINGS_DIR AND INCLUDE_BINDINGS_DIR) # check if the directory exists if(NOT IS_DIRECTORY ${CMAKE_SOURCE_DIR}/src/bindings/${INCLUDE_BINDINGS_DIR}) @@ -196,25 +193,9 @@ if(DEFINED INCLUDE_BINDINGS_DIR AND INCLUDE_BINDINGS_DIR) if(NOT EXISTS ${CMAKE_SOURCE_DIR}/src/bindings/${INCLUDE_BINDINGS_DIR}/CMakeLists.txt) message(FATAL_ERROR "The script library does not contain a CMakeLists.txt!") endif() - message(STATUS "Build script library : Yes (using ${INCLUDE_BINDINGS_DIR})") else() - message(STATUS "Build script library : No") endif() -# if(CLI) -# message(STATUS "Build with CLI : Yes (default)") -# add_definitions(-DENABLE_CLI) -# else() -# message(STATUS "Build with CLI : No") -# endif() - -# if(RA) -# message(STATUS "* Build with RA : Yes") -# add_definitions(-DENABLE_RA) -# else(RA) -# message(STATUS "* Build with RA : No (default)") -# endif(RA) - if(PCH AND NOT PCHSupport_FOUND) set(PCH 0 CACHE BOOL "Use precompiled headers" @@ -222,31 +203,15 @@ if(PCH AND NOT PCHSupport_FOUND) message(WARNING "No PCH for your system possible but PCH was set to 1. Resetting it." ) endif() -if(PCH) - message(STATUS "Use PCH : Yes") -else() - message(STATUS "Use PCH : No") -endif() if(DEBUG) - message(STATUS "Build in debug-mode : Yes") set(CMAKE_BUILD_TYPE Debug) else() set(CMAKE_BUILD_TYPE Release) - message(STATUS "Build in debug-mode : No (default)") endif() -# if(SQL) -# message(STATUS "Install SQL-files : Yes") -# else() -# message(STATUS "Install SQL-files : No (default)") -# endif() - -# if(TOOLS) -# message(STATUS "Build map/vmap tools : Yes") -# else() -# message(STATUS "Build map/vmap tools : No (default)") -# endif() +# print out the results before continuing +include(cmake/showoptions.cmake) # Generate revision-extractor set(GENREV_SRC diff --git a/cmake/showoptions.cmake b/cmake/showoptions.cmake new file mode 100644 index 0000000000..40d6c0f81a --- /dev/null +++ b/cmake/showoptions.cmake @@ -0,0 +1,50 @@ +# output generic information about the core +message(STATUS "CMaNGOS-Core revision : ${GIT_REVISION}") +message(STATUS "Install server to : ${CMAKE_INSTALL_PREFIX}") + +# Show infomation about the options selected during configuration +if(DEFINED INCLUDE_BINDINGS_DIR AND INCLUDE_BINDINGS_DIR) + message(STATUS "Build script library : Yes (using ${INCLUDE_BINDINGS_DIR})") +else() + message(STATUS "Build script library : No") +endif() + +# if(CLI) +# message(STATUS "Build with CLI : Yes (default)") +# add_definitions(-DENABLE_CLI) +# else() +# message(STATUS "Build with CLI : No") +# endif() + +# if(RA) +# message(STATUS "* Build with RA : Yes") +# add_definitions(-DENABLE_RA) +# else(RA) +# message(STATUS "* Build with RA : No (default)") +# endif(RA) + +if(PCH) + message(STATUS "Use PCH : Yes") +else() + message(STATUS "Use PCH : No") +endif() + +if(DEBUG) + message(STATUS "Build in debug-mode : Yes") +else() + message(STATUS "Build in debug-mode : No (default)") +endif() + +# if(SQL) +# message(STATUS "Install SQL-files : Yes") +# else() +# message(STATUS "Install SQL-files : No (default)") +# endif() + +# if(TOOLS) +# message(STATUS "Build map/vmap tools : Yes") +# else() +# message(STATUS "Build map/vmap tools : No (default)") +# endif() + +message("")