Merge topic 'allow-backward-compatibility'

b2997bcbe Support backward compatibility in CMake package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3234
This commit is contained in:
Kenneth Moreland 2024-06-24 13:05:22 +00:00 committed by Kitware Robot
commit 4335e43e50
2 changed files with 18 additions and 1 deletions

@ -352,7 +352,7 @@ configure_package_config_file(
write_basic_package_version_file(
${VTKm_BUILD_CMAKE_BASE_DIR}/${VTKm_INSTALL_CONFIG_DIR}/VTKmConfigVersion.cmake
VERSION ${VTKm_VERSION}
COMPATIBILITY ExactVersion )
COMPATIBILITY SameMajorVersion )
#-----------------------------------------------------------------------------
# Add subdirectories

@ -0,0 +1,17 @@
# Support backward compatibility in CMake package
VTK-m development is in a mode where backward compatibility should be
maintained between minor versions of the software. (You may get deprecation
warnings, but things should still work.) To match this behavior, the
generated CMake package now supports finding versions with the same major
release and the same or newer minor release. For example, if an external
program does this
``` cmake
find_package(VTKm 2.1 REQUIRED)
```
then CMake will link to 2.1 (of course) as well as newer minor releases
(e.g., 2.2, 2.3, etc.). It will not, however, match older versions (e.g.,
2.0, 1.9), nor will it match any version after the next major release
(e.g., 3.0).