summaryrefslogtreecommitdiffstats
path: root/Tests/FindPackageTest/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-01-11 20:56:59 (GMT)
committerBrad King <brad.king@kitware.com>2011-01-11 20:56:59 (GMT)
commit784d5ce0f8bf630901dece526df7ce663da17e6a (patch)
tree0b4647ace5986304b15b3f900fee969e278f33db /Tests/FindPackageTest/CMakeLists.txt
parent2d3594b1bbd48d0dc7a071a6806c75c89341e1c5 (diff)
parentce28737c933a749cbc84c601f3ac9f56e4c832aa (diff)
downloadCMake-784d5ce0f8bf630901dece526df7ce663da17e6a.zip
CMake-784d5ce0f8bf630901dece526df7ce663da17e6a.tar.gz
CMake-784d5ce0f8bf630901dece526df7ce663da17e6a.tar.bz2
Merge branch 'policy-CMP0017' into resolve/python-versions/policy-CMP0017
Conflicts: Modules/FindPythonInterp.cmake
Diffstat (limited to 'Tests/FindPackageTest/CMakeLists.txt')
-rw-r--r--Tests/FindPackageTest/CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt
index a472bea..f420f4b 100644
--- a/Tests/FindPackageTest/CMakeLists.txt
+++ b/Tests/FindPackageTest/CMakeLists.txt
@@ -1,6 +1,15 @@
cmake_minimum_required (VERSION 2.6)
PROJECT(FindPackageTest)
+LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
+
+# Look for a package which uses FindPackageHandleStandardArgs.cmake with the
+# new (as of cmake 2.8.3) syntax. This works only if CMP0017 is set to NEW,
+# because otherwise FindPackageHandleStandardArgs.cmake from the current
+# directory is included (via CMAKE_MODULE_PATH).
+CMAKE_POLICY(SET CMP0017 NEW)
+FIND_PACKAGE(ZLIB QUIET)
+
# Look for a package that has a find module and may be found.
FIND_PACKAGE(OpenGL QUIET)
@@ -23,7 +32,6 @@ IF(NOT FOO_DIR)
CMAKE_PREFIX_PATH = ${CMAKE_PREFIX_PATH}")
ENDIF(NOT FOO_DIR)
-LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
FIND_PACKAGE(VersionTestA 1)
FIND_PACKAGE(VersionTestB 1.2)
FIND_PACKAGE(VersionTestC 1.2.3)