Made building the docs optionally with -DFUN_BUILD_DOCS=ON. No code changes. (0.41.5)
This commit is contained in:
parent
570407688c
commit
24c54fba41
1 changed files with 51 additions and 39 deletions
|
|
@ -37,11 +37,18 @@ else()
|
|||
set(_FUN_WITH_RUST_STATE "DISABLED")
|
||||
endif()
|
||||
|
||||
if(FUN_BUILD_DOCS)
|
||||
set(_FUN_BUILD_DOCS "ENABLED")
|
||||
else()
|
||||
set(_FUN_BUILD_DOCS "DISABLED")
|
||||
endif()
|
||||
|
||||
message(STATUS "==== Fun build options ====")
|
||||
message(STATUS " FUN_DEBUG: ${_FUN_DEBUG_STATE}")
|
||||
message(STATUS " FUN_USE_MUSL: ${_FUN_USE_MUSL_STATE}")
|
||||
message(STATUS " FUN_WITH_CPP: ${_FUN_WITH_CPP_STATE}")
|
||||
message(STATUS " FUN_WITH_RUST: ${_FUN_WITH_RUST_STATE}")
|
||||
message(STATUS " FUN_BUILD_DOCS: ${_FUN_BUILD_DOCS}")
|
||||
message(STATUS "===========================")
|
||||
|
||||
# Convenience aggregate target (like 'build' in Makefile)
|
||||
|
|
@ -425,8 +432,12 @@ if(BUILD_TESTING)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
# --- Doxygen docs target ---
|
||||
# Generate API documentation for everything under src/ into <build>/docs/html
|
||||
# --- Doxygen docs target (optional) ---
|
||||
# Generate API documentation for everything under src/ into <build>/docs/html.
|
||||
# Disabled by default; enable with -DFUN_BUILD_DOCS=ON
|
||||
option(FUN_BUILD_DOCS "Enable Doxygen documentation target 'fun_docs'" OFF)
|
||||
|
||||
if(FUN_BUILD_DOCS)
|
||||
find_package(Doxygen REQUIRED dot)
|
||||
|
||||
# Provide a boolean for HAVE_DOT in the Doxyfile
|
||||
|
|
@ -468,6 +479,7 @@ add_custom_target(fun_docs
|
|||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating API documentation with Doxygen"
|
||||
VERBATIM)
|
||||
endif()
|
||||
|
||||
# Install rules
|
||||
# Binary
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue