From 706fa3ba71b166b88455710b912e0bef853c31a7 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 4 Jul 2026 15:49:42 +0200 Subject: [PATCH 1/3] DOC: inconsistent dependencies for documentation build Handling the addition and removal of example files for the file `Examples.dox` fixes #6545 --- Utilities/Doxygen/CMakeLists.txt | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/Utilities/Doxygen/CMakeLists.txt b/Utilities/Doxygen/CMakeLists.txt index 0d620cded3f..9f57add2204 100644 --- a/Utilities/Doxygen/CMakeLists.txt +++ b/Utilities/Doxygen/CMakeLists.txt @@ -162,23 +162,35 @@ if(ITK_BUILD_DOCUMENTATION) find_package(LATEX) + file( + GLOB_RECURSE EXAMPLES_LIST + CONFIGURE_DEPENDS + "${ITK_SOURCE_DIR}/Examples/*.cxx" + "${ITK_SOURCE_DIR}/Examples/*.py" + "${ITK_SOURCE_DIR}/Examples/*.java" + ) + set(ITK_EXAMPLES ${ITK_BINARY_DIR}/Documentation/Doxygen/Examples.dox) + # Custom command to generate a examples page which include all ITK examples add_custom_command( OUTPUT - "${ITK_BINARY_DIR}/Documentation/Doxygen/Examples.dox" + Examples.dox COMMAND ${CMAKE_COMMAND} -D "PROJECT_SOURCE_DIR:PATH=${ITK_SOURCE_DIR}" -D - "OUTPUT_FILE:PATH=${ITK_BINARY_DIR}/Documentation/Doxygen/Examples.dox" -P + "OUTPUT_FILE:PATH=${ITK_EXAMPLES}" -P "${ITK_SOURCE_DIR}/Utilities/Doxygen/GenerateExamplesDox.cmake" - WORKING_DIRECTORY "${ITK_SOURCE_DIR}/Examples" + #WORKING_DIRECTORY "${ITK_SOURCE_DIR}/Examples" + WORKING_DIRECTORY ${ITK_BINARY_DIR}/Documentation/Doxygen DEPENDS - "${ITK_SOURCE_DIR}/Examples" + ${EXAMPLES_LIST} "${ITK_SOURCE_DIR}/Utilities/Doxygen/GenerateExamplesDox.cmake" ) + set_source_files_properties(${ITK_EXAMPLES} PROPERTIES GENERATED 1) add_custom_target( - ITKDoxygenExamplesDox + ITKDoxygenExamplesDox + ALL DEPENDS - "${ITK_BINARY_DIR}/Documentation/Doxygen/Examples.dox" + Examples.dox ) set( @@ -186,7 +198,7 @@ if(ITK_BUILD_DOCUMENTATION) ${DOXYGEN_INCLUDE_DIRS} ${ITK_SOURCE_DIR}/Documentation/Doxygen ${ITK_BINARY_DIR}/Documentation/Doxygen - ${ITK_BINARY_DIR}/Documentation/Doxygen/Examples.dox + ${ITK_EXAMPLES} ${ITK_BINARY_DIR}/Utilities/Doxygen/Modules ${ITK_DOXYGEN_INPUT} ) From 2f4853cdc684bf64ef193d44df1a97e333a359c9 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 4 Jul 2026 15:58:13 +0200 Subject: [PATCH 2/3] DOC: inconsistent dependencies for documentation build Fixing pre-commit hook failure. --- Utilities/Doxygen/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Utilities/Doxygen/CMakeLists.txt b/Utilities/Doxygen/CMakeLists.txt index 9f57add2204..34ef9e58f0b 100644 --- a/Utilities/Doxygen/CMakeLists.txt +++ b/Utilities/Doxygen/CMakeLists.txt @@ -185,13 +185,13 @@ if(ITK_BUILD_DOCUMENTATION) ${EXAMPLES_LIST} "${ITK_SOURCE_DIR}/Utilities/Doxygen/GenerateExamplesDox.cmake" ) - set_source_files_properties(${ITK_EXAMPLES} PROPERTIES GENERATED 1) - add_custom_target( - ITKDoxygenExamplesDox - ALL - DEPENDS - Examples.dox + set_source_files_properties( + ${ITK_EXAMPLES} + PROPERTIES + GENERATED + 1 ) + add_custom_target(ITKDoxygenExamplesDox ALL DEPENDS Examples.dox) set( ITK_DOXYGEN_INPUT From 4e2c2143f90a33eb7636d9e6336155cd4da1b970 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 4 Jul 2026 16:00:28 +0200 Subject: [PATCH 3/3] DOC: inconsistent dependencies for documentation build Fixing pre-commit hook failure. --- Utilities/Doxygen/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Utilities/Doxygen/CMakeLists.txt b/Utilities/Doxygen/CMakeLists.txt index 34ef9e58f0b..287870893c1 100644 --- a/Utilities/Doxygen/CMakeLists.txt +++ b/Utilities/Doxygen/CMakeLists.txt @@ -187,9 +187,9 @@ if(ITK_BUILD_DOCUMENTATION) ) set_source_files_properties( ${ITK_EXAMPLES} - PROPERTIES - GENERATED - 1 + PROPERTIES + GENERATED + 1 ) add_custom_target(ITKDoxygenExamplesDox ALL DEPENDS Examples.dox)