summaryrefslogtreecommitdiffstats
path: root/Source/cmGetTargetPropertyCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-01-11 16:50:14 (GMT)
committerBrad King <brad.king@kitware.com>2015-01-11 16:50:14 (GMT)
commitca5fe169aa4873af5b1ba4c6b2ecb35b84364974 (patch)
tree2357a0d8995117ebc7bfa2b545a51f2d79e2fbe8 /Source/cmGetTargetPropertyCommand.cxx
parentac16b88e5062c0c5d7bd020fdd139a2953d427c9 (diff)
parentc6d03a1072c8f3ae285f4297caf96637b3a47c22 (diff)
downloadCMake-ca5fe169aa4873af5b1ba4c6b2ecb35b84364974.zip
CMake-ca5fe169aa4873af5b1ba4c6b2ecb35b84364974.tar.gz
CMake-ca5fe169aa4873af5b1ba4c6b2ecb35b84364974.tar.bz2
Merge branch 'fix-empty-target-property-queries' into release
Diffstat (limited to 'Source/cmGetTargetPropertyCommand.cxx')
-rw-r--r--Source/cmGetTargetPropertyCommand.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmGetTargetPropertyCommand.cxx b/Source/cmGetTargetPropertyCommand.cxx
index aa6f0c1..fb59df8 100644
--- a/Source/cmGetTargetPropertyCommand.cxx
+++ b/Source/cmGetTargetPropertyCommand.cxx
@@ -23,6 +23,7 @@ bool cmGetTargetPropertyCommand
std::string var = args[0];
const std::string& targetName = args[1];
std::string prop;
+ bool prop_exists = false;
if(args[2] == "ALIASED_TARGET")
{
@@ -32,6 +33,7 @@ bool cmGetTargetPropertyCommand
this->Makefile->FindTargetToUse(targetName))
{
prop = target->GetName();
+ prop_exists = true;
}
}
}
@@ -42,6 +44,7 @@ bool cmGetTargetPropertyCommand
if(prop_cstr)
{
prop = prop_cstr;
+ prop_exists = true;
}
}
else
@@ -74,7 +77,7 @@ bool cmGetTargetPropertyCommand
}
}
}
- if (!prop.empty())
+ if (prop_exists)
{
this->Makefile->AddDefinition(var, prop.c_str());
return true;