diff options
author | Brad King <brad.king@kitware.com> | 2014-04-02 18:54:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-04-02 18:54:17 (GMT) |
commit | 97243c22b29f453c6403f514f73e6b8dec127194 (patch) | |
tree | 3d89f18df42396d53e97f3b0d51bf5690fa6d1f8 /Source/cmMakefile.cxx | |
parent | f180fc89255bdd72e5d1b49ba7e7cc8dcb77c72e (diff) | |
parent | a41c0a9dcbc201b183bcc0a0c0f6bf9f2cebd079 (diff) | |
download | CMake-97243c22b29f453c6403f514f73e6b8dec127194.zip CMake-97243c22b29f453c6403f514f73e6b8dec127194.tar.gz CMake-97243c22b29f453c6403f514f73e6b8dec127194.tar.bz2 |
Merge branch 'revise-compiler-id-policies' into release
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 11559d9..27ce999 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4350,6 +4350,22 @@ cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id) const return this->GetPolicies()->GetPolicyStatus(id); } +//---------------------------------------------------------------------------- +bool cmMakefile::PolicyOptionalWarningEnabled(std::string const& var) +{ + // Check for an explicit CMAKE_POLICY_WARNING_CMP<NNNN> setting. + if(!var.empty()) + { + if(const char* val = this->GetDefinition(var.c_str())) + { + return cmSystemTools::IsOn(val); + } + } + // Enable optional policy warnings with --debug-output or --trace. + cmake* cm = this->GetCMakeInstance(); + return cm->GetDebugOutput() || cm->GetTrace(); +} + bool cmMakefile::SetPolicy(const char *id, cmPolicies::PolicyStatus status) { |