Skip to content

Commit 19136c1

Browse files
committed
Add advanced CMake option to prevent detail from being excluded
1 parent 02c43b4 commit 19136c1

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

cmake/dependencies/doxygen.cmake

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# Doxygen
22
find_package(Doxygen OPTIONAL_COMPONENTS mscgen dia dot)
33
if(DOXYGEN_FOUND)
4-
option(FLAMEGPU_BUILD_API_DOCUMENTATION "Enable building documentation (requires Doxygen)" ON)
4+
include(CMakeDependentOption)
5+
option(FLAMEGPU_BUILD_API_DOCUMENTATION "Enable building documentation (requires Doxygen)" ON)
6+
# option to hide / not hide the detail namespace from the docs, developers can enable it if they want detail docs / the actual docs website might require this due to breathe/exhale not respecting doxygen exclude correctly and not having an equivalent option.
7+
cmake_dependent_option(FLAMEGPU_API_DOCUMENTATION_EXCLUDE_DETAIL "Exclude the detail namespace from doxygen documentation" ON "FLAMEGPU_BUILD_API_DOCUMENTATION" ON)
8+
mark_as_advanced(FLAMEGPU_API_DOCUMENTATION_EXCLUDE_DETAIL)
59
else()
610
if(CMAKE_CUDA_COMPILER STREQUAL NOTFOUND)
711
message(FATAL_ERROR
@@ -70,8 +74,11 @@ function(flamegpu_create_doxygen_target FLAMEGPU_ROOT DOXY_OUT_DIR XML_PATH)
7074
endif()
7175
endif()
7276
# Ignore some namespaces where forward declarationss lead to empty namespaces in the docs.
73-
# @todo - optionally don't block detail, for developer docs
74-
set(DOXYGEN_EXCLUDE_SYMBOLS "jitify" "tinyxml2" "detail")
77+
set(DOXYGEN_EXCLUDE_SYMBOLS "jitify" "tinyxml2")
78+
# Ignore detail too if the advanced option is enabled, this is currently required for API docs due to exhale/breathe issues.
79+
if(FLAMEGPU_API_DOCUMENTATION_EXCLUDE_DETAIL)
80+
list(APPEND DOXYGEN_EXCLUDE_SYMBOLS "detail")
81+
endif()
7582
# These are required for expanding FLAMEGPUException definition macros to be documented
7683
set(DOXYGEN_ENABLE_PREPROCESSING YES)
7784
set(DOXYGEN_MACRO_EXPANSION YES)

0 commit comments

Comments
 (0)