Improve documentation and messages for the new CMP0017

This patch incorporates the comments from Brad:
-some improvements to the documentation of CMP0017
-make the test QUIETLY search for zlib
This commit is contained in:
Alex Neundorf 2010-12-15 22:24:05 +01:00 committed by Brad King
parent db44848f44
commit 7db8db5b72
3 changed files with 11 additions and 11 deletions

View File

@ -77,8 +77,7 @@ public:
"CMake module directory. There is one exception to this: if the file " "CMake module directory. There is one exception to this: if the file "
"which calls include() is located itself in the CMake module directory, " "which calls include() is located itself in the CMake module directory, "
"then first the CMake module directory is searched and " "then first the CMake module directory is searched and "
"CMAKE_MODULE_PATH afterwards. This behaviour is controlled by policy " "CMAKE_MODULE_PATH afterwards. See also policy CMP0017."
"CMP0017."
"\n" "\n"
"See the cmake_policy() command documentation for discussion of the " "See the cmake_policy() command documentation for discussion of the "
"NO_POLICY_SCOPE option." "NO_POLICY_SCOPE option."

View File

@ -449,19 +449,20 @@ cmPolicies::cmPolicies()
this->DefinePolicy( this->DefinePolicy(
CMP0017, "CMP0017", CMP0017, "CMP0017",
"Prefer files from CMAKE_ROOT/ when including from CMAKE_ROOT.", "Prefer files from the CMake module directory when including from there.",
"Starting with CMake 2.8.3, if a cmake-module shipped with CMake (i.e. " "Starting with CMake 2.8.4, if a cmake-module shipped with CMake (i.e. "
"located in CMAKE_ROOT/Modules/) calls include() or find_package(), " "located in the CMake module directory) calls include() or "
"the files located in CMAKE_ROOT/Modules/ are prefered over the files " "find_package(), the files located in the the CMake module directory are "
"in CMAKE_MODULE_PATH. This makes sure that the modules belonging to " "prefered over the files in CMAKE_MODULE_PATH. "
"This makes sure that the modules belonging to "
"CMake always get those files included which they expect, and against " "CMake always get those files included which they expect, and against "
"which they were developed and tested. " "which they were developed and tested. "
"In call other cases, the files found in " "In call other cases, the files found in "
"CMAKE_MODULE_PATH still take precedence over the ones in " "CMAKE_MODULE_PATH still take precedence over the ones in "
"CMAKE_ROOT/Modules/. " "the CMake module directory. "
"The OLD behaviour is to always prefer files from CMAKE_MODULE_PATH over " "The OLD behaviour is to always prefer files from CMAKE_MODULE_PATH over "
"files from CMAKE_ROOT/Modules/.", "files from the CMake modules directory.",
2,8,3,0, cmPolicies::WARN); 2,8,4,0, cmPolicies::WARN);
} }
cmPolicies::~cmPolicies() cmPolicies::~cmPolicies()

View File

@ -8,7 +8,7 @@ LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
# because otherwise FindPackageHandleStandardArgs.cmake from the current # because otherwise FindPackageHandleStandardArgs.cmake from the current
# directory is included (via CMAKE_MODULE_PATH). # directory is included (via CMAKE_MODULE_PATH).
CMAKE_POLICY(SET CMP0017 NEW) CMAKE_POLICY(SET CMP0017 NEW)
FIND_PACKAGE(ZLIB) FIND_PACKAGE(ZLIB QUIET)
# Look for a package that has a find module and may be found. # Look for a package that has a find module and may be found.
FIND_PACKAGE(OpenGL QUIET) FIND_PACKAGE(OpenGL QUIET)