Skip to content

Commit c20bdff

Browse files
committed
COMP: Skip dot-directories when scanning for ITK modules
GLOB_RECURSE matches itk-module.cmake at any depth, so a nested source tree under a dot-directory is absorbed as a set of duplicate modules. Dot-directories hold tool state by convention -- git worktrees, editor and agent directories, and environment or cache trees such as the in-source .pixi directory created by ITK's own build tooling -- and .gitignore already declares several of them non-source. One affected tree reported 984 modules where 204 exist, and failed building the stale duplicates.
1 parent 3ae346c commit c20bdff

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

CMake/ITKModuleEnablement.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ macro(itk_module_load_dag)
88
RELATIVE "${ITK_SOURCE_DIR}"
99
"${ITK_SOURCE_DIR}/*/*/*/itk-module.cmake" # grouped modules
1010
)
11+
# Dot-directories hold tool state (worktrees, environments, caches), not ITK source.
12+
list(FILTER meta EXCLUDE REGEX "(^|/)\\.")
1113
foreach(f ${meta})
1214
include(${ITK_SOURCE_DIR}/${f})
1315
list(APPEND ITK_MODULES_ALL ${itk-module})

0 commit comments

Comments
 (0)