summaryrefslogtreecommitdiffstats
path: root/Tests/ExportImport
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2020-09-13 14:32:32 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2020-09-23 10:52:25 (GMT)
commit5b3356263cf8f00c79c25aa9e3ac71ffd8cc7e7e (patch)
treea219a6ba773248d05b8674c665addb9854593440 /Tests/ExportImport
parent6bfc442fde18f5544d7e7333d12701050a765535 (diff)
downloadCMake-5b3356263cf8f00c79c25aa9e3ac71ffd8cc7e7e.zip
CMake-5b3356263cf8f00c79c25aa9e3ac71ffd8cc7e7e.tar.gz
CMake-5b3356263cf8f00c79c25aa9e3ac71ffd8cc7e7e.tar.bz2
CMakePackageConfigHelpers: Add version range support
Diffstat (limited to 'Tests/ExportImport')
-rw-r--r--Tests/ExportImport/Import/CMakeLists.txt3
-rw-r--r--Tests/ExportImport/Import/version_range/CMakeLists.txt15
2 files changed, 18 insertions, 0 deletions
diff --git a/Tests/ExportImport/Import/CMakeLists.txt b/Tests/ExportImport/Import/CMakeLists.txt
index 189f7a2..a8a98fc 100644
--- a/Tests/ExportImport/Import/CMakeLists.txt
+++ b/Tests/ExportImport/Import/CMakeLists.txt
@@ -23,3 +23,6 @@ add_subdirectory(try_compile)
# Test package INTERFACE controls
add_subdirectory(Interface)
+
+# Test package version range
+add_subdirectory(version_range)
diff --git a/Tests/ExportImport/Import/version_range/CMakeLists.txt b/Tests/ExportImport/Import/version_range/CMakeLists.txt
new file mode 100644
index 0000000..73b1d1e
--- /dev/null
+++ b/Tests/ExportImport/Import/version_range/CMakeLists.txt
@@ -0,0 +1,15 @@
+
+cmake_minimum_required(VERSION 3.18)
+
+find_package(testLibRequired 2.0...3.0)
+
+if (NOT testLibRequired_FOUND)
+ message(SEND_ERROR "version_range: fail to find package testLibRequired(2.5) with range 2.0...3.0")
+endif()
+
+
+find_package(testLibRequired 2.0...<2.5)
+
+if (testLibRequired_FOUND)
+ message(SEND_ERROR "version_range: package testLibRequired(2.5) unexpectedly found with range 2.0...<2.5")
+endif()