Add option to turn off Doxygen html

The Doxygen html generation takes a lot more time than the xml
generation. If all you want from Doxygen is the xml for the user's
guide, that can be frustrating. Add an option to turn off the xml.
This commit is contained in:
Kenneth Moreland 2023-08-18 15:04:08 -04:00
parent 7523f841b0
commit 3d3b66865f
3 changed files with 25 additions and 2 deletions

@ -13,6 +13,17 @@
#-----------------------------------------------------------------------------
find_package(Doxygen REQUIRED)
#-----------------------------------------------------------------------------
# Function to turn CMake booleans to `YES` or `NO` as expected by Doxygen
#-----------------------------------------------------------------------------
function(to_yes_no variable)
if(${variable})
set(${variable} YES PARENT_SCOPE)
else()
set(${variable} NO PARENT_SCOPE)
endif()
endfunction()
#-----------------------------------------------------------------------------
# Configure Doxygen
#-----------------------------------------------------------------------------
@ -20,6 +31,9 @@ set(VTKm_DOXYGEN_HAVE_DOT ${DOXYGEN_DOT_FOUND})
set(VTKm_DOXYGEN_DOT_PATH ${DOXYGEN_DOT_PATH})
set(VTKm_DOXYFILE ${CMAKE_CURRENT_BINARY_DIR}/docs/doxyfile)
to_yes_no(VTKm_ENABLE_USERS_GUIDE)
to_yes_no(VTKm_Doxygen_HTML_output)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMake/doxyfile.in ${VTKm_DOXYFILE}
@ONLY)

@ -202,7 +202,7 @@ IGNORE_PREFIX =
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
GENERATE_HTML = @VTKm_Doxygen_HTML_output@
HTML_OUTPUT = html
@ -294,7 +294,7 @@ MAN_LINKS = NO
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = YES
GENERATE_XML = @VTKm_ENABLE_USERS_GUIDE@
XML_OUTPUT = xml

@ -126,6 +126,15 @@ cmake_dependent_option(VTKm_ENABLE_USERS_GUIDE
"VTKm_ENABLE_DOCUMENTATION"
OFF
)
# If you are building the User's Guide, you may only need the XML output from Doxygen, which
# is much faster than generating the HTML. Thus, give the option to turn on/off the HTML output.
cmake_dependent_option(VTKm_Doxygen_HTML_output
"Build HTML output"
ON
"VTKm_ENABLE_USERS_GUIDE"
ON
)
mark_as_advanced(VTKm_Doxygen_HTML_output)
# We may want to make finer controls on whether libraries/modules get built.
# VTK uses the concept of groups for its modules