summaryrefslogtreecommitdiff
path: root/Source/cmGetPropertyCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-05-09 10:50:29 -0400
committerBrad King <brad.king@kitware.com>2014-05-09 11:24:15 -0400
commit911cc9a39e1f26344d47743885626060c2d94d2c (patch)
treea0199eb310d875d3a891cbf78224f79893750b6f /Source/cmGetPropertyCommand.cxx
parentcb810abe6d1c4189517d84fa6e08849a02e3f873 (diff)
downloadcmake-911cc9a39e1f26344d47743885626060c2d94d2c.tar.gz
cmTarget: Evaluate CMP0026 and CMP0051 in calling context
These policies should be checked at the call site that tries to access the LOCATION or SOURCES property, not the directory scope containing the target. Thread the caller context through cmTarget::GetProperty to use for checking the policy setting and emitting a diagnostic with proper backtrace. Extend the RunCMake.CMP0026 and RunCMake.CMP0051 tests with cross-directory cases.
Diffstat (limited to 'Source/cmGetPropertyCommand.cxx')
-rw-r--r--Source/cmGetPropertyCommand.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx
index 6dd40c9213..512d78994c 100644
--- a/Source/cmGetPropertyCommand.cxx
+++ b/Source/cmGetPropertyCommand.cxx
@@ -302,7 +302,8 @@ bool cmGetPropertyCommand::HandleTargetMode()
}
if(cmTarget* target = this->Makefile->FindTargetToUse(this->Name))
{
- return this->StoreResult(target->GetProperty(this->PropertyName));
+ return this->StoreResult(target->GetProperty(this->PropertyName,
+ this->Makefile));
}
else
{