diff options
author | Brad King <brad.king@kitware.com> | 2008-10-03 14:41:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-10-03 14:41:15 (GMT) |
commit | 0ae545ebad1b6b2a6c851205854b887d19c8da59 (patch) | |
tree | 3ce7529352db9f46da5be76d7d83253a0ee2875a /Tests/FindPackageTest | |
parent | 79e9b7555827ba0afe6e6b7d97c81002685ef519 (diff) | |
download | CMake-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/FindPackageTest')
-rw-r--r-- | Tests/FindPackageTest/lib/zot/zot-config-version.cmake | 10 | ||||
-rw-r--r-- | Tests/FindPackageTest/lib/zot/zot-config.cmake | 2 |
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") |