BUG: Fix GPUPDEDeformable module dependencies#5781
Merged
Conversation
Move ITKPDEDeformableRegistration and ITKGPURegistrationCommon from COMPILE_DEPENDS to DEPENDS because public headers in this module include headers from ITKPDEDeformableRegistration (specifically itkDemonsRegistrationFilter.h). This fixes compilation errors when building tests that cannot find the required headers. The error was: error C1083: Cannot open include file: 'itkDemonsRegistrationFilter.h' COMPILE_DEPENDS only makes headers available during the compilation of the module's source files, but not for tests or dependent modules. Since the public API depends on these headers, they must be listed as regular DEPENDS.
dzenanz
approved these changes
Feb 8, 2026
Member
Author
|
I asked my local CoPilot to do this quick change. Hopefully it's comments and messages were correct :) There is a need to document the change in COMPILE_DEPENDS, verify correct behavior and maybe depricate it as it does not map well to the CMAkE library interfaces. |
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes a compilation error in the
ITKGPUPDEDeformableRegistrationmodule where test builds were failing because required headers could not be found.Issue
The module's public header
itkGPUDemonsRegistrationFilter.hincludesitkDemonsRegistrationFilter.hfrom theITKPDEDeformableRegistrationmodule, but this dependency was listed asCOMPILE_DEPENDSinstead ofDEPENDS.Build error from CDash:
https://open.cdash.org/viewBuildError.php?buildid=11026050
Changes
Moved
ITKPDEDeformableRegistrationandITKGPURegistrationCommonfromCOMPILE_DEPENDStoDEPENDSinitk-module.cmake.Rationale
COMPILE_DEPENDSonly makes headers available during compilation of the module's source filesDEPENDSmakes headers available for tests and dependent modulesTesting
This fix resolves the compilation error reported on the Windows build on CDash.