Skip to content

Commit

Permalink
DOC: Remove dependencies heading when there are no dependencies
Browse files Browse the repository at this point in the history
When in the automatically generated module / topics page there were
no dependencies present there was still the word "Dependencies".
  • Loading branch information
albert-github authored and dzenanz committed Feb 4, 2025
1 parent 8ae9f91 commit 7c65070
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions CMake/ITKModuleDoxygen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,30 @@ macro(itk_module_doxygen _name)
set(_content "${_content} \\defgroup ${_name} Module ${_name} \n")
set(_content "${_content} ${ITK_MODULE_${_name}_DESCRIPTION} \n")

set(_content "${_content} \\par Dependencies:\n")

# _dotcontent defines the content of the ${_name}.dot
set(_dotcontent "graph \"${_name}\" { \n")

set(non_empty_loop "OFF")
foreach(d ${ITK_MODULE_${_name}_DEPENDS})
set(_content "${_content} \\li \\ref ${d} \n")
set(_dotcontent "${_dotcontent} \"${_name}\" -- \"${d}\"; \n")
set(non_empty_loop "ON")
endforeach()

set(_dotcontent "${_dotcontent} }")
if (${non_empty_loop})
set(_content "${_content} \\par Dependencies:\n")

# _dotcontent defines the content of the ${_name}.dot
set(_dotcontent "graph \"${_name}\" { \n")

# add the image that will be generated by dot based on the defined graph
# here
set(_content "${_content} \\dot \n")
set(_content "${_content} ${_dotcontent} \n")
set(_content "${_content} \\enddot \n")
foreach(d ${ITK_MODULE_${_name}_DEPENDS})
set(_content "${_content} \\li \\ref ${d} \n")
set(_dotcontent "${_dotcontent} \"${_name}\" -- \"${d}\"; \n")
endforeach()

set(_dotcontent "${_dotcontent} }")

# add the image that will be generated by dot based on the defined graph
# here
set(_content "${_content} \\dot \n")
set(_content "${_content} ${_dotcontent} \n")
set(_content "${_content} \\enddot \n")
endif()
set(_content "${_content} */\n")

if(ITK_SOURCE_DIR)
Expand Down

0 comments on commit 7c65070

Please sign in to comment.