InsightSoftwareConsortium / ITK

Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions.
https://itk.org
Apache License 2.0
1.43k stars 668 forks source link

COMP: Improve path management for python package install #4984

Closed hjmjohnson closed 4 days ago

hjmjohnson commented 5 days ago

cmake 3.31 does an implicit conversion of paths like: /myvenv/site-packages//itk --> /myvenv/site-packages/itk ^^ ^

which produces many warnings like:

ITKCommon: Creating itkAnatomicalOrientation submodule.
 CMake Warning (dev) at Wrapping/Generators/Python/CMakeLists.txt:88 (install):
   Policy CMP0177 is not set: install() DESTINATION paths are normalized.  Run
   "cmake --help-policy CMP0177" for policy details.  Use the cmake_policy
   command to set the policy and suppress this warning.
 Call Stack (most recent call first):
   Wrapping/Generators/Python/CMakeLists.txt:305 (wrap_itk_python_bindings_install)
   Wrapping/Generators/Python/CMakeLists.txt:380 (itk_setup_swig_python)
   Wrapping/macro_files/itk_auto_load_submodules.cmake:328 (itk_end_wrap_submodule_python)
   Wrapping/TypedefMacros.cmake:1331 (itk_auto_load_submodules)
   Modules/Core/Common/wrapping/CMakeLists.txt:63 (itk_auto_load_and_end_wrap_submodules)

Explicitly normalizing the path before calling the install command suppresses the message.

PR Checklist