summaryrefslogtreecommitdiffstats
path: root/Tests/FindPackageTest/lib
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-29 01:38:48 (GMT)
committerBrad King <brad.king@kitware.com>2008-01-29 01:38:48 (GMT)
commit41c2895b7524cc4dc60225044a6bba99e0c048ab (patch)
tree55c46e2b65be4069f3f7d4a01646df32d67af0b1 /Tests/FindPackageTest/lib
parent404db8811e4d6dc8ed89f4b1e3efafbb5985dc44 (diff)
downloadCMake-41c2895b7524cc4dc60225044a6bba99e0c048ab.zip
CMake-41c2895b7524cc4dc60225044a6bba99e0c048ab.tar.gz
CMake-41c2895b7524cc4dc60225044a6bba99e0c048ab.tar.bz2
ENH: Added version support to Config mode of find_package command.
- Added EXACT option to request an exact version. - Enforce version using check provided by package. - Updated FindPackageTest to test versioning in config mode.
Diffstat (limited to 'Tests/FindPackageTest/lib')
-rw-r--r--Tests/FindPackageTest/lib/suffix/test/SuffixTestConfigVersion.cmake7
-rw-r--r--Tests/FindPackageTest/lib/zot-1.0/zot-config.cmake1
-rw-r--r--Tests/FindPackageTest/lib/zot-2.0/zot-config-version.cmake5
-rw-r--r--Tests/FindPackageTest/lib/zot-2.0/zot-config.cmake1
-rw-r--r--Tests/FindPackageTest/lib/zot-3.0/zot-config-version.cmake5
-rw-r--r--Tests/FindPackageTest/lib/zot-3.0/zot-config.cmake1
-rw-r--r--Tests/FindPackageTest/lib/zot-3.1/zot-config-version.cmake8
-rw-r--r--Tests/FindPackageTest/lib/zot-3.1/zot-config.cmake1
8 files changed, 29 insertions, 0 deletions
diff --git a/Tests/FindPackageTest/lib/suffix/test/SuffixTestConfigVersion.cmake b/Tests/FindPackageTest/lib/suffix/test/SuffixTestConfigVersion.cmake
new file mode 100644
index 0000000..5c3bdde
--- /dev/null
+++ b/Tests/FindPackageTest/lib/suffix/test/SuffixTestConfigVersion.cmake
@@ -0,0 +1,7 @@
+SET(PACKAGE_VERSION 1.2)
+IF("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL 1)
+ SET(PACKAGE_VERSION_COMPATIBLE 1)
+ IF("${PACKAGE_FIND_VERSION_MINOR}" EQUAL 2)
+ SET(PACKAGE_VERSION_EXACT 1)
+ ENDIF("${PACKAGE_FIND_VERSION_MINOR}" EQUAL 2)
+ENDIF("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL 1)
diff --git a/Tests/FindPackageTest/lib/zot-1.0/zot-config.cmake b/Tests/FindPackageTest/lib/zot-1.0/zot-config.cmake
new file mode 100644
index 0000000..deffa57
--- /dev/null
+++ b/Tests/FindPackageTest/lib/zot-1.0/zot-config.cmake
@@ -0,0 +1 @@
+# Test config file.
diff --git a/Tests/FindPackageTest/lib/zot-2.0/zot-config-version.cmake b/Tests/FindPackageTest/lib/zot-2.0/zot-config-version.cmake
new file mode 100644
index 0000000..10ac53d
--- /dev/null
+++ b/Tests/FindPackageTest/lib/zot-2.0/zot-config-version.cmake
@@ -0,0 +1,5 @@
+SET(PACKAGE_VERSION 2.0)
+IF("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL 2)
+ SET(PACKAGE_VERSION_COMPATIBLE 1)
+ENDIF("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL 2)
+
diff --git a/Tests/FindPackageTest/lib/zot-2.0/zot-config.cmake b/Tests/FindPackageTest/lib/zot-2.0/zot-config.cmake
new file mode 100644
index 0000000..deffa57
--- /dev/null
+++ b/Tests/FindPackageTest/lib/zot-2.0/zot-config.cmake
@@ -0,0 +1 @@
+# Test config file.
diff --git a/Tests/FindPackageTest/lib/zot-3.0/zot-config-version.cmake b/Tests/FindPackageTest/lib/zot-3.0/zot-config-version.cmake
new file mode 100644
index 0000000..af57cfa
--- /dev/null
+++ b/Tests/FindPackageTest/lib/zot-3.0/zot-config-version.cmake
@@ -0,0 +1,5 @@
+SET(PACKAGE_VERSION 3.0)
+IF("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL 3)
+ SET(PACKAGE_VERSION_COMPATIBLE 1)
+ENDIF("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL 3)
+
diff --git a/Tests/FindPackageTest/lib/zot-3.0/zot-config.cmake b/Tests/FindPackageTest/lib/zot-3.0/zot-config.cmake
new file mode 100644
index 0000000..deffa57
--- /dev/null
+++ b/Tests/FindPackageTest/lib/zot-3.0/zot-config.cmake
@@ -0,0 +1 @@
+# Test config file.
diff --git a/Tests/FindPackageTest/lib/zot-3.1/zot-config-version.cmake b/Tests/FindPackageTest/lib/zot-3.1/zot-config-version.cmake
new file mode 100644
index 0000000..b54d94c
--- /dev/null
+++ b/Tests/FindPackageTest/lib/zot-3.1/zot-config-version.cmake
@@ -0,0 +1,8 @@
+SET(PACKAGE_VERSION 3.1)
+IF("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL 3)
+ SET(PACKAGE_VERSION_COMPATIBLE 1)
+ IF("${PACKAGE_FIND_VERSION_MINOR}" EQUAL 1)
+ SET(PACKAGE_VERSION_EXACT 1)
+ ENDIF("${PACKAGE_FIND_VERSION_MINOR}" EQUAL 1)
+ENDIF("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL 3)
+
diff --git a/Tests/FindPackageTest/lib/zot-3.1/zot-config.cmake b/Tests/FindPackageTest/lib/zot-3.1/zot-config.cmake
new file mode 100644
index 0000000..deffa57
--- /dev/null
+++ b/Tests/FindPackageTest/lib/zot-3.1/zot-config.cmake
@@ -0,0 +1 @@
+# Test config file.