summaryrefslogtreecommitdiffstats
path: root/Tests/ExportImport
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2020-09-24 11:28:52 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-09-24 11:29:03 (GMT)
commitac5195c408a713c9c31388ef9b3c0e6f5173b2da (patch)
tree0bc6f2e902b775bbcfaacc83c3a82c77c69e983b /Tests/ExportImport
parentd18c564210dd20692536b4988afc8356c5926694 (diff)
parent5b3356263cf8f00c79c25aa9e3ac71ffd8cc7e7e (diff)
downloadCMake-ac5195c408a713c9c31388ef9b3c0e6f5173b2da.zip
CMake-ac5195c408a713c9c31388ef9b3c0e6f5173b2da.tar.gz
CMake-ac5195c408a713c9c31388ef9b3c0e6f5173b2da.tar.bz2
Merge topic 'find_package-version-range'
5b3356263c CMakePackageConfigHelpers: Add version range support 6bfc442fde FPHSA: add support of version range d7df81067b find_package: Add support of version range 09095dbcd2 cmFindPackageCommand: Refactoring Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Michael Hirsch, Ph.D. <michael@scivision.dev> Merge-request: !5226
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()