diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-04-01 18:53:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-04-02 17:00:48 (GMT) |
commit | 06f61c26cfa19a47610ad718a784bdd7db105cf8 (patch) | |
tree | 1797c44c18bd596ae1ed8003012985fb374b6e87 /Source/cmMakefile.cxx | |
parent | f2e07a6d90806d50b6897051c2275e38689d16e7 (diff) | |
download | CMake-06f61c26cfa19a47610ad718a784bdd7db105cf8.zip CMake-06f61c26cfa19a47610ad718a784bdd7db105cf8.tar.gz CMake-06f61c26cfa19a47610ad718a784bdd7db105cf8.tar.bz2 |
Do not treat DEFINITIONS as a built-in directory property
Add policy CMP0059 to cover this change. The property has been
deprecated since CMake 2.4 anyway.
This will help clean up cmMakefile -- the DefineFlagsOrig member should
not need to exist.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 6fbcaeb..ec1d814 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4209,8 +4209,19 @@ const char *cmMakefile::GetProperty(const std::string& prop, } else if (prop == "DEFINITIONS") { - output += this->DefineFlagsOrig; - return output.c_str(); + switch(this->GetPolicyStatus(cmPolicies::CMP0059)) + { + case cmPolicies::WARN: + this->IssueMessage(cmake::AUTHOR_WARNING, this->GetPolicies()-> + GetPolicyWarning(cmPolicies::CMP0059)); + case cmPolicies::OLD: + output += this->DefineFlagsOrig; + return output.c_str(); + case cmPolicies::NEW: + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::REQUIRED_IF_USED: + break; + } } else if (prop == "LINK_DIRECTORIES") { |