mirror of
https://github.com/Kitware/CMake.git
synced 2026-11-06 05:16:58 +00:00
FindDoxygen: Tolerate empty output formats
Amend commit 8fc8f564c9 (FindDoxygen: Create and clean recursive
subdirectories for output formats, 2026-08-09) to avoid syntax errors
with undefined variables.
Fixes: #28222
This commit is contained in:
1 parent
bc7346c06b
commit
63e7673d0b
2 files changed
+12
-3
No files matched your search
@@ -1178,9 +1178,9 @@ function(_doxygen_collect_output_dirs outputDirs)
|
||||
set(_doxygen_output_dirs "")
|
||||
foreach(_format IN LISTS _doxygen_output_formats)
|
||||
set(_doxygen_generate_format "DOXYGEN_GENERATE_${_format}")
|
||||
if(DEFINED "${_doxygen_generate_format}" AND ${${_doxygen_generate_format}})
|
||||
if(${_doxygen_generate_format})
|
||||
set(_doxygen_format_output "DOXYGEN_${_format}_OUTPUT")
|
||||
if(DEFINED _doxygen_format_output)
|
||||
if(DEFINED ${_doxygen_format_output})
|
||||
list(APPEND _doxygen_output_dirs "${${_doxygen_format_output}}" )
|
||||
endif()
|
||||
unset(_doxygen_format_output)
|
||||
|
||||
@@ -57,5 +57,14 @@ foreach(f IN LISTS expectedList)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Tolerate output formats explicitly set to an empty value.
|
||||
set(DOXYGEN_OUTPUT_DIRECTORY emptyGenerate)
|
||||
set(DOXYGEN_GENERATE_LATEX "")
|
||||
doxygen_add_docs(docsEmptyGenerate main.cpp)
|
||||
unset(DOXYGEN_GENERATE_LATEX)
|
||||
if(NOT TARGET docsEmptyGenerate)
|
||||
message(FATAL_ERROR "Target docsEmptyGenerate not created")
|
||||
endif()
|
||||
|
||||
add_custom_target(allDocTargets)
|
||||
add_dependencies(allDocTargets docsNoArgs docsWithArgs)
|
||||
add_dependencies(allDocTargets docsNoArgs docsWithArgs docsEmptyGenerate)
|
||||
Reference in new issue
Block a user