diff options
author | David Cole <david.cole@kitware.com> | 2012-03-02 16:48:38 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-03-02 16:48:38 (GMT) |
commit | 0ee7b8ea03b83189e2857154cd5be03148346f6b (patch) | |
tree | 88a3ce572809fbc0aa989e631319f11f7adf1e36 /Source/cmDocumentVariables.cxx | |
parent | a1860aaf1a7f55d9eeb6b6dc54bf96774eb15bdf (diff) | |
parent | eeaaffcb2f68254ccd5cc6fbf4d13fed41d40774 (diff) | |
download | CMake-0ee7b8ea03b83189e2857154cd5be03148346f6b.zip CMake-0ee7b8ea03b83189e2857154cd5be03148346f6b.tar.gz CMake-0ee7b8ea03b83189e2857154cd5be03148346f6b.tar.bz2 |
Merge topic 'find_package-improve-messages'
eeaaffc find_package: Test error and warning messages in failure cases
52dffb9 Merge branch 'test-CMakeCommands' into find_package-improve-messages
d365104 find_package: Optionally warn when implicitly using Config mode
31ead5f find_package: Reject mixed use of MODULE- and CONFIG-only options
6d83083 find_package: mention requested version number in error message
9c39bbd find_package: add CONFIG mode keyword alias for NO_MODULE
f310f67 find_package: add MODULE mode to use only Find-modules
7d67dcf find_package: improve error message when no Find module is present
978d89b find_package: rename NoModule to UseFindModules
Diffstat (limited to 'Source/cmDocumentVariables.cxx')
-rw-r--r-- | Source/cmDocumentVariables.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx index 366ebaa..a31dd01 100644 --- a/Source/cmDocumentVariables.cxx +++ b/Source/cmDocumentVariables.cxx @@ -746,6 +746,26 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "Variables That Change Behavior"); cm->DefineProperty + ("CMAKE_FIND_PACKAGE_WARN_NO_MODULE", cmProperty::VARIABLE, + "Tell find_package to warn if called without an explicit mode.", + "If find_package is called without an explicit mode option " + "(MODULE, CONFIG or NO_MODULE) and no Find<pkg>.cmake module is " + "in CMAKE_MODULE_PATH then CMake implicitly assumes that the " + "caller intends to search for a package configuration file. " + "If no package configuration file is found then the wording " + "of the failure message must account for both the case that the " + "package is really missing and the case that the project has a " + "bug and failed to provide the intended Find module. " + "If instead the caller specifies an explicit mode option then " + "the failure message can be more specific." + "\n" + "Set CMAKE_FIND_PACKAGE_WARN_NO_MODULE to TRUE to tell find_package " + "to warn when it implicitly assumes Config mode. " + "This helps developers enforce use of an explicit mode in all calls " + "to find_package within a project.", false, + "Variables That Change Behavior"); + + cm->DefineProperty ("CMAKE_USER_MAKE_RULES_OVERRIDE", cmProperty::VARIABLE, "Specify a CMake file that overrides platform information.", "CMake loads the specified file while enabling support for each " |