Repository navigation
BUG: Reject absolute ITK install directories - #6919
hjmjohnson merged 1 commit into
Conversation
|
@greptileai review this |
|
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The validation is consistently applied before affected install paths are generated, with no unresolved issues found.
Review effort: Balanced
Findings: None
What changed in this PR
Rejects absolute ITK installation directories before generating invalid install metadata.
Changes:
- Validates all
ITK_INSTALL_*_DIRvalues in main and external-module configurations. - Simplifies test-driver RPATH generation under the enforced relative-path invariant.
| File | Description |
|---|---|
CMakeLists.txt |
Adds top-level install-directory validation. |
CMake/ITKModuleExternal.cmake |
Applies validation to external modules. |
Modules/Core/TestKernel/src/CMakeLists.txt |
Removes redundant local validation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Reject absolute
ITK_INSTALL_*_DIRvalues at configure time so install metadata cannot be generated with prefixed absolute paths. Closes #6896.Validation
cmake -S . -B build-6896-policy-ok -DITK_BUILD_DEFAULT_MODULES=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFFcmake -S . -B build-6896-policy-bad -DITK_BUILD_DEFAULT_MODULES=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DITK_INSTALL_LIBRARY_DIR=/usr/lib64failed with the new configure-time errorcmake -S . -B build-6896-cmake-install-libdir-bad -DITK_BUILD_DEFAULT_MODULES=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DCMAKE_INSTALL_LIBDIR=/usr/lib64failed with the new configure-time errorcmake --build build-6896-policy-ok --target itkTestDriver -j 6git diff --checkpre-commit run --files CMakeLists.txt CMake/ITKModuleExternal.cmake Modules/Core/TestKernel/src/CMakeLists.txtAI assistance