forked from Mirrorlandia_minetest/minetest
build: Allow disabling documentation build + print more build flags (#13871)
* build: permit to disable documentation build * build: add a message about some BUILD_* flags
This commit is contained in:
parent
2c74797d34
commit
929a13a9a0
@ -37,10 +37,13 @@ if (CMAKE_BUILD_TYPE STREQUAL Debug)
|
|||||||
set(VERSION_STRING "${VERSION_STRING}-debug")
|
set(VERSION_STRING "${VERSION_STRING}-debug")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message(STATUS "*** Will build version ${VERSION_STRING} ***")
|
|
||||||
|
|
||||||
|
|
||||||
# Configuration options
|
# Configuration options
|
||||||
|
set(BUILD_CLIENT TRUE CACHE BOOL "Build client")
|
||||||
|
set(BUILD_SERVER FALSE CACHE BOOL "Build server")
|
||||||
|
set(BUILD_UNITTESTS TRUE CACHE BOOL "Build unittests")
|
||||||
|
set(BUILD_BENCHMARKS FALSE CACHE BOOL "Build benchmarks")
|
||||||
|
set(BUILD_DOCUMENTATION TRUE CACHE BOOL "Build documentation")
|
||||||
|
|
||||||
set(DEFAULT_RUN_IN_PLACE FALSE)
|
set(DEFAULT_RUN_IN_PLACE FALSE)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(DEFAULT_RUN_IN_PLACE TRUE)
|
set(DEFAULT_RUN_IN_PLACE TRUE)
|
||||||
@ -48,11 +51,13 @@ endif()
|
|||||||
set(RUN_IN_PLACE ${DEFAULT_RUN_IN_PLACE} CACHE BOOL
|
set(RUN_IN_PLACE ${DEFAULT_RUN_IN_PLACE} CACHE BOOL
|
||||||
"Run directly in source directory structure")
|
"Run directly in source directory structure")
|
||||||
|
|
||||||
|
message(STATUS "*** Will build version ${VERSION_STRING} ***")
|
||||||
set(BUILD_CLIENT TRUE CACHE BOOL "Build client")
|
message(STATUS "BUILD_CLIENT: " ${BUILD_CLIENT})
|
||||||
set(BUILD_SERVER FALSE CACHE BOOL "Build server")
|
message(STATUS "BUILD_SERVER: " ${BUILD_SERVER})
|
||||||
set(BUILD_UNITTESTS TRUE CACHE BOOL "Build unittests")
|
message(STATUS "BUILD_UNITTESTS: " ${BUILD_UNITTESTS})
|
||||||
set(BUILD_BENCHMARKS FALSE CACHE BOOL "Build benchmarks")
|
message(STATUS "BUILD_BENCHMARKS: " ${BUILD_BENCHMARKS})
|
||||||
|
message(STATUS "BUILD_DOCUMENTATION: " ${BUILD_DOCUMENTATION})
|
||||||
|
message(STATUS "RUN_IN_PLACE: " ${RUN_IN_PLACE})
|
||||||
|
|
||||||
set(WARN_ALL TRUE CACHE BOOL "Enable -Wall for Release build")
|
set(WARN_ALL TRUE CACHE BOOL "Enable -Wall for Release build")
|
||||||
|
|
||||||
@ -394,8 +399,9 @@ include(CPack)
|
|||||||
|
|
||||||
|
|
||||||
# Add a target to generate API documentation with Doxygen
|
# Add a target to generate API documentation with Doxygen
|
||||||
find_package(Doxygen)
|
if(BUILD_DOCUMENTATION)
|
||||||
if(DOXYGEN_FOUND)
|
find_package(Doxygen)
|
||||||
|
if(DOXYGEN_FOUND)
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile @ONLY)
|
${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile @ONLY)
|
||||||
add_custom_target(doc
|
add_custom_target(doc
|
||||||
@ -403,4 +409,5 @@ if(DOXYGEN_FOUND)
|
|||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
|
||||||
COMMENT "Generating API documentation with Doxygen" VERBATIM
|
COMMENT "Generating API documentation with Doxygen" VERBATIM
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -13,6 +13,7 @@ General options and their default values:
|
|||||||
BUILD_SERVER=FALSE - Build Minetest server
|
BUILD_SERVER=FALSE - Build Minetest server
|
||||||
BUILD_UNITTESTS=TRUE - Build unittest sources
|
BUILD_UNITTESTS=TRUE - Build unittest sources
|
||||||
BUILD_BENCHMARKS=FALSE - Build benchmark sources
|
BUILD_BENCHMARKS=FALSE - Build benchmark sources
|
||||||
|
BUILD_DOCUMENTATION=TRUE - Build doxygen documentation
|
||||||
CMAKE_BUILD_TYPE=Release - Type of build (Release vs. Debug)
|
CMAKE_BUILD_TYPE=Release - Type of build (Release vs. Debug)
|
||||||
Release - Release build
|
Release - Release build
|
||||||
Debug - Debug build
|
Debug - Debug build
|
||||||
|
Loading…
Reference in New Issue
Block a user