Skip to content

Commit

Permalink
Add separate cmake file to show configuration options
Browse files Browse the repository at this point in the history
[ci skip]

(based on cmangos/mangos-wotlk@7e9bf06)

Signed-off-by: stfx <stfx@hotmail.de>
  • Loading branch information
DomGries committed Sep 2, 2015
1 parent 65688fc commit 334ac70
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 37 deletions.
39 changes: 2 additions & 37 deletions CMakeLists.txt
Expand Up @@ -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})
Expand All @@ -196,57 +193,25 @@ 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"
FORCE)
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
Expand Down
50 changes: 50 additions & 0 deletions 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("")

0 comments on commit 334ac70

Please sign in to comment.