summaryrefslogtreecommitdiffstats
path: root/Source/cmGetTargetPropertyCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-05-09 14:50:29 (GMT)
committerBrad King <brad.king@kitware.com>2014-05-09 15:24:15 (GMT)
commit911cc9a39e1f26344d47743885626060c2d94d2c (patch)
treea0199eb310d875d3a891cbf78224f79893750b6f /Source/cmGetTargetPropertyCommand.cxx
parentcb810abe6d1c4189517d84fa6e08849a02e3f873 (diff)
downloadCMake-911cc9a39e1f26344d47743885626060c2d94d2c.zip
CMake-911cc9a39e1f26344d47743885626060c2d94d2c.tar.gz
CMake-911cc9a39e1f26344d47743885626060c2d94d2c.tar.bz2
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/cmGetTargetPropertyCommand.cxx')
-rw-r--r--Source/cmGetTargetPropertyCommand.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmGetTargetPropertyCommand.cxx b/Source/cmGetTargetPropertyCommand.cxx
index e3ec0bc..aa6f0c1 100644
--- a/Source/cmGetTargetPropertyCommand.cxx
+++ b/Source/cmGetTargetPropertyCommand.cxx
@@ -38,7 +38,7 @@ bool cmGetTargetPropertyCommand
else if(cmTarget* tgt = this->Makefile->FindTargetToUse(targetName))
{
cmTarget& target = *tgt;
- const char* prop_cstr = target.GetProperty(args[2]);
+ const char* prop_cstr = target.GetProperty(args[2], this->Makefile);
if(prop_cstr)
{
prop = prop_cstr;