summaryrefslogtreecommitdiffstats
path: root/Source/cmGetDirectoryPropertyCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-06-07 12:50:54 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-06-08 20:23:44 (GMT)
commit52b9d828ab482f5eaae3313d821d9a4a492f069b (patch)
tree5bfd46840fe306a15b23d3ddf65ea4fe3dea73ca /Source/cmGetDirectoryPropertyCommand.cxx
parentfe603c7dfb8a3d0dfc892b46f9df0b4c32a892f9 (diff)
downloadCMake-52b9d828ab482f5eaae3313d821d9a4a492f069b.zip
CMake-52b9d828ab482f5eaae3313d821d9a4a492f069b.tar.gz
CMake-52b9d828ab482f5eaae3313d821d9a4a492f069b.tar.bz2
cmMakefile: Move CMP0059 handling to command code.
Don't pay a penalty for it in all GetProperty calls. Additionally, the storage of properties will eventually move to cmState, which should only contain state and not logic for policies like this.
Diffstat (limited to 'Source/cmGetDirectoryPropertyCommand.cxx')
-rw-r--r--Source/cmGetDirectoryPropertyCommand.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmGetDirectoryPropertyCommand.cxx b/Source/cmGetDirectoryPropertyCommand.cxx
index f60eba7..c056d95 100644
--- a/Source/cmGetDirectoryPropertyCommand.cxx
+++ b/Source/cmGetDirectoryPropertyCommand.cxx
@@ -86,6 +86,23 @@ bool cmGetDirectoryPropertyCommand
const char *prop = 0;
if (!i->empty())
{
+ if (*i == "DEFINITIONS")
+ {
+ switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0059))
+ {
+ case cmPolicies::WARN:
+ this->Makefile->IssueMessage(cmake::AUTHOR_WARNING,
+ cmPolicies::GetPolicyWarning(cmPolicies::CMP0059));
+ case cmPolicies::OLD:
+ this->StoreResult(variable,
+ this->Makefile->GetDefineFlagsCMP0059());
+ return true;
+ case cmPolicies::NEW:
+ case cmPolicies::REQUIRED_ALWAYS:
+ case cmPolicies::REQUIRED_IF_USED:
+ break;
+ }
+ }
prop = dir->GetProperty(*i);
}
this->StoreResult(variable, prop);