diff options
author | Brad King <brad.king@kitware.com> | 2008-08-18 20:29:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-08-18 20:29:00 (GMT) |
commit | f50ed1fd8897eae39da6ed9f3af2bc3eab2c35af (patch) | |
tree | 08afc4edd05c42e0e0643a878af458f4c195b735 /Source/cmPolicies.h | |
parent | 061d20be3869d53e0dee4c72b4f9e0202fe6b197 (diff) | |
download | CMake-f50ed1fd8897eae39da6ed9f3af2bc3eab2c35af.zip CMake-f50ed1fd8897eae39da6ed9f3af2bc3eab2c35af.tar.gz CMake-f50ed1fd8897eae39da6ed9f3af2bc3eab2c35af.tar.bz2 |
ENH: Improve errors when a policy is REQUIRED
In the future some policies may be set to REQUIRED_IF_USED or
REQUIRED_ALWAYS. This change clarifies the error messages users receive
when violating the requirements.
Diffstat (limited to 'Source/cmPolicies.h')
-rw-r--r-- | Source/cmPolicies.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index 7c9be18..5284034 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -75,20 +75,15 @@ public: ///! Set a policy level for this listfile bool ApplyPolicyVersion(cmMakefile *mf, const char *version); - ///! test to see if setting a policy to a specific value is valid - bool IsValidPolicyStatus(cmPolicies::PolicyID id, - cmPolicies::PolicyStatus status); - - ///! test to see if setting a policy to a specific value is valid, when used - bool IsValidUsedPolicyStatus(cmPolicies::PolicyID id, - cmPolicies::PolicyStatus status); - ///! return a warning string for a given policy std::string GetPolicyWarning(cmPolicies::PolicyID id); ///! return an error string for when a required policy is unspecified std::string GetRequiredPolicyError(cmPolicies::PolicyID id); + ///! return an error string for when a required policy is unspecified + std::string GetRequiredAlwaysPolicyError(cmPolicies::PolicyID id); + ///! Get docs for policies void GetDocumentation(std::vector<cmDocumentationEntry>& v); @@ -96,7 +91,10 @@ public: // might have to make these internal for VS6 not sure yet std::map<PolicyID,cmPolicy *> Policies; std::map<std::string,PolicyID> PolicyStringMap; - + + void DiagnoseAncientPolicies(std::vector<PolicyID> const& ancient, + unsigned int majorVer, unsigned int minorVer, + unsigned int patchVer, cmMakefile* mf); }; #endif |