From b2997bcbe87ea72876b9700997ce370a041c79d5 Mon Sep 17 00:00:00 2001 From: Kenneth Moreland Date: Fri, 21 Jun 2024 15:28:42 -0400 Subject: [PATCH] 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). --- CMakeLists.txt | 2 +- docs/changelog/allow-backward-compatibility.md | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 docs/changelog/allow-backward-compatibility.md diff --git a/CMakeLists.txt b/CMakeLists.txt index d8204114c..495549167 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -337,7 +337,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 ) #----------------------------------------------------------------------------- # Create makefile/package files for projects not using CMake diff --git a/docs/changelog/allow-backward-compatibility.md b/docs/changelog/allow-backward-compatibility.md new file mode 100644 index 000000000..92a180278 --- /dev/null +++ b/docs/changelog/allow-backward-compatibility.md @@ -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).