summaryrefslogtreecommitdiffstats
path: root/Tests/FindPackageTest
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-04 14:28:48 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-04 14:35:00 (GMT)
commit7e187eeacd609c18940aa7cd700b048f72fd5568 (patch)
tree4d69b0d0052792039f057489cfef2d4bb8c851b3 /Tests/FindPackageTest
parent8982a4b30161e90ac6b3f7db11c3c6772835e9f6 (diff)
downloadCMake-7e187eeacd609c18940aa7cd700b048f72fd5568.zip
CMake-7e187eeacd609c18940aa7cd700b048f72fd5568.tar.gz
CMake-7e187eeacd609c18940aa7cd700b048f72fd5568.tar.bz2
CMP0017: Fix check when including from CMake source tree
When running CMake from the build tree the CMAKE_ROOT is the entire source tree. Fix the CMP0017 check to be specific to the Modules/ directory under CMAKE_ROOT so that Tests/ does not count. Fix the FindPackageTest modules to include FPHSA by full path from CMAKE_ROOT so that they do not include the local FPHSA which reports an error meant to test that CMP0017 works.
Diffstat (limited to 'Tests/FindPackageTest')
-rw-r--r--Tests/FindPackageTest/FindLotsOfComponents.cmake2
-rw-r--r--Tests/FindPackageTest/FindSomePackage.cmake2
-rw-r--r--Tests/FindPackageTest/FindUpperCasePackage.cmake2
3 files changed, 3 insertions, 3 deletions
diff --git a/Tests/FindPackageTest/FindLotsOfComponents.cmake b/Tests/FindPackageTest/FindLotsOfComponents.cmake
index 9076d86..5d959c5 100644
--- a/Tests/FindPackageTest/FindLotsOfComponents.cmake
+++ b/Tests/FindPackageTest/FindLotsOfComponents.cmake
@@ -4,7 +4,7 @@ set(LotsOfComponents_AComp_FOUND TRUE)
set(LotsOfComponents_BComp_FOUND FALSE)
set(LotsOfComponents_CComp_FOUND TRUE)
-include(FindPackageHandleStandardArgs)
+include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(LotsOfComponents REQUIRED_VARS LOC_FOO
HANDLE_COMPONENTS)
diff --git a/Tests/FindPackageTest/FindSomePackage.cmake b/Tests/FindPackageTest/FindSomePackage.cmake
index 83d1d0e..7283d24 100644
--- a/Tests/FindPackageTest/FindSomePackage.cmake
+++ b/Tests/FindPackageTest/FindSomePackage.cmake
@@ -1,6 +1,6 @@
set(SOP_FOO TRUE)
-include(FindPackageHandleStandardArgs)
+include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(SomePackage REQUIRED_VARS SOP_FOO
FOUND_VAR SomePackage_FOUND )
diff --git a/Tests/FindPackageTest/FindUpperCasePackage.cmake b/Tests/FindPackageTest/FindUpperCasePackage.cmake
index 66c2fea..425d417 100644
--- a/Tests/FindPackageTest/FindUpperCasePackage.cmake
+++ b/Tests/FindPackageTest/FindUpperCasePackage.cmake
@@ -1,6 +1,6 @@
set(UCP_FOO TRUE)
-include(FindPackageHandleStandardArgs)
+include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
find_package_handle_standard_args(UpperCasePackage REQUIRED_VARS UCP_FOO
FOUND_VAR UPPERCASEPACKAGE_FOUND )