Skip to content

COMP: Require ITK 6 - #482

Merged
hjmjohnson merged 1 commit into
InsightSoftwareConsortium:mainfrom
hjmjohnson:comp-require-itk6-only
Sep 14, 2026
Merged

hjmjohnson merged 1 commit into
InsightSoftwareConsortium:mainfrom
hjmjohnson:comp-require-itk6-only

Conversation

@hjmjohnson

@hjmjohnson hjmjohnson commented Sep 12, 2026

Copy link
Copy Markdown
Member

Raise the minimum ITK to 6 in src/CMakeLists.txt. Every example already
links ITK::<Name>Module interface targets, which ITK 5.x does not export.

What ITK 5.x does today, and what this changes

Against ITK 5.4 the build currently fails with one missing-target error per
example — 346 in all — because the namespaced interface targets were introduced
in ITK 6. Requiring ITK 6 at the top level stops at the first find_package
with a single version error instead:

CMake Error at src/CMakeLists.txt:7 (find_package):
  Could not find a configuration file for package "ITK" that is compatible
  with requested version "6".

Three examples still named an older minimum (5.0, 5.0, 4.7.0) from before the
CMake refactoring. They now use a bare find_package(ITK REQUIRED) like the
other 408 examples, so the requirement is stated once, in src/CMakeLists.txt.

Where ITK 5.x examples live

The release-5.4 branch was created at b0679d89, the last commit that still
builds against ITK 5.x. Verified against ITK 5.4.7: 0 failed targets, 346
executables, 370 of 370 tests passing.

@github-actions github-actions Bot added area:Core Issues affecting the Core module area:Filtering Issues affecting the Filtering module type:Compiler Compiler support or related warnings type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots labels Sep 12, 2026
@hjmjohnson
hjmjohnson marked this pull request as ready for review September 13, 2026 17:07
Comment thread src/Core/Common/FilterAndParallelizeImageRegion/CMakeLists.txt
@hjmjohnson
hjmjohnson force-pushed the comp-require-itk6-only branch from c59cf89 to 5302fe0 Compare September 14, 2026 15:42
Every example links ITK::...Module interface targets, which ITK 5.x does
not export, so against ITK 5.4 configure fails with one missing-target
error per example (346 in all). Requiring ITK 6 stops at the first
find_package with a single version error instead.

Examples for ITK 5.x now live on the release-5.4 branch.
@hjmjohnson
hjmjohnson force-pushed the comp-require-itk6-only branch from 5302fe0 to 314ed1d Compare September 14, 2026 15:44
@hjmjohnson
hjmjohnson merged commit d00defb into InsightSoftwareConsortium:main Sep 14, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Core Issues affecting the Core module area:Filtering Issues affecting the Filtering module type:Compiler Compiler support or related warnings type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants