summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-01-11 17:00:20 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-01-11 17:00:20 (GMT)
commitcb5fc7b993866e7398922d34a1b1807ad061d4b0 (patch)
tree4167c477aa66abcd18ed22f55d0caefd5f830d9d /Source
parentf098e0e22bedbaf7aa41ef5f8fb9e10478b6672e (diff)
parentc6d03a1072c8f3ae285f4297caf96637b3a47c22 (diff)
downloadCMake-cb5fc7b993866e7398922d34a1b1807ad061d4b0.zip
CMake-cb5fc7b993866e7398922d34a1b1807ad061d4b0.tar.gz
CMake-cb5fc7b993866e7398922d34a1b1807ad061d4b0.tar.bz2
Merge topic 'fix-empty-target-property-queries'
c6d03a10 tests: add tests for querying properties 76ff92e0 set_tests_properties: fix documentation 28214862 get_test_property: clarify the documentation 34a99094 get_target_property: discern empty from undefined properties (#15333)
Diffstat (limited to 'Source')
-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;