diff options
author | Brad King <brad.king@kitware.com> | 2008-06-09 19:09:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-06-09 19:09:14 (GMT) |
commit | fdb17d604cd8e353bfedcc256be2bf12f2071ded (patch) | |
tree | 192709e4f8ca236eef841bcf596355db0344b4e8 /Tests/FindPackageTest/CMakeLists.txt | |
parent | 5b406c9044772ab56632edf6824759210c28f1c4 (diff) | |
download | CMake-fdb17d604cd8e353bfedcc256be2bf12f2071ded.zip CMake-fdb17d604cd8e353bfedcc256be2bf12f2071ded.tar.gz CMake-fdb17d604cd8e353bfedcc256be2bf12f2071ded.tar.bz2 |
ENH: Add test for new find_* command HINTS option.
Diffstat (limited to 'Tests/FindPackageTest/CMakeLists.txt')
-rw-r--r-- | Tests/FindPackageTest/CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt index e19c709..f02cd70 100644 --- a/Tests/FindPackageTest/CMakeLists.txt +++ b/Tests/FindPackageTest/CMakeLists.txt @@ -36,6 +36,7 @@ FIND_PACKAGE(VersionTestC 1.2.3) SET(PACKAGES foo Foo Bar TFramework Tframework TApp Tapp Special VersionedA VersionedB + wibbleA wibbleB ) FOREACH(p ${PACKAGES}) SET(${p}_DIR "" CACHE FILEPATH "Wipe out find results for testing." FORCE) @@ -58,6 +59,11 @@ FIND_PACKAGE(Special NAMES Suffix SuffixTest PATH_SUFFIXES test) FIND_PACKAGE(VersionedA 2 NAMES zot) FIND_PACKAGE(VersionedB 3.1 EXACT NAMES zot) +# HINTS should override the system but PATHS should not +LIST(INSERT CMAKE_SYSTEM_PREFIX_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/A") +FIND_PACKAGE(wibbleA NAMES wibble PATHS B) +FIND_PACKAGE(wibbleB NAMES wibble HINTS B) + # Expected locations at which packages should be found. SET(foo_EXPECTED "lib/foo-1.2/foo-config.cmake") SET(Foo_EXPECTED "lib/foo-1.2/CMake/FooConfig.cmake") @@ -73,6 +79,8 @@ SET(Tapp_EXPECTED "TApp.app/Contents/Resources/cmake/tapp-config.cmake") SET(VersionedA_EXPECTED "lib/zot-2.0/zot-config.cmake") SET(VersionedB_EXPECTED "lib/zot-3.1/zot-config.cmake") +SET(wibbleA_EXPECTED "A/wibble-config.cmake") +SET(wibbleB_EXPECTED "B/wibble-config.cmake") # Check the results. FOREACH(p ${PACKAGES}) |