summaryrefslogtreecommitdiffstats
path: root/Source/cmGetTargetPropertyCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGetTargetPropertyCommand.cxx')
-rw-r--r--Source/cmGetTargetPropertyCommand.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/cmGetTargetPropertyCommand.cxx b/Source/cmGetTargetPropertyCommand.cxx
index 963e16a..97b4d7f 100644
--- a/Source/cmGetTargetPropertyCommand.cxx
+++ b/Source/cmGetTargetPropertyCommand.cxx
@@ -28,9 +28,7 @@ bool cmGetTargetPropertyCommand
std::string var = args[0].c_str();
const char* targetName = args[1].c_str();
- cmTarget *tgt = this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
- ->FindTarget(0, targetName, true);
- if (tgt)
+ if(cmTarget* tgt = this->Makefile->FindTargetToUse(targetName))
{
cmTarget& target = *tgt;
const char *prop = target.GetProperty(args[2].c_str());