summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-10-03 14:41:15 (GMT)
committerBrad King <brad.king@kitware.com>2008-10-03 14:41:15 (GMT)
commit0ae545ebad1b6b2a6c851205854b887d19c8da59 (patch)
tree3ce7529352db9f46da5be76d7d83253a0ee2875a /Tests
parent79e9b7555827ba0afe6e6b7d97c81002685ef519 (diff)
downloadCMake-0ae545ebad1b6b2a6c851205854b887d19c8da59.zip
CMake-0ae545ebad1b6b2a6c851205854b887d19c8da59.tar.gz
CMake-0ae545ebad1b6b2a6c851205854b887d19c8da59.tar.bz2
ENH: Add UNSUITABLE result to package version test
Package version test files may now declare that they are unsuitable for use with the project testing them. This is important when the version being tested does not provide a compatible ABI with the project target environment.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/FindPackageTest/lib/zot/zot-config-version.cmake10
-rw-r--r--Tests/FindPackageTest/lib/zot/zot-config.cmake2
2 files changed, 12 insertions, 0 deletions
diff --git a/Tests/FindPackageTest/lib/zot/zot-config-version.cmake b/Tests/FindPackageTest/lib/zot/zot-config-version.cmake
new file mode 100644
index 0000000..2a6be86
--- /dev/null
+++ b/Tests/FindPackageTest/lib/zot/zot-config-version.cmake
@@ -0,0 +1,10 @@
+# This version should never, ever be used.
+SET(PACKAGE_VERSION_UNSUITABLE 1)
+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/zot-config.cmake b/Tests/FindPackageTest/lib/zot/zot-config.cmake
new file mode 100644
index 0000000..442b8a4
--- /dev/null
+++ b/Tests/FindPackageTest/lib/zot/zot-config.cmake
@@ -0,0 +1,2 @@
+# Test config file that is unsuitable.
+MESSAGE(FATAL_ERROR "Unsuitable version of zot was found")