summaryrefslogtreecommitdiff
path: root/Source/cmTargetPropCommandBase.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2018-10-26 09:14:44 -0400
committerBen Boeckel <ben.boeckel@kitware.com>2018-10-26 12:08:16 -0400
commit9f64974f5eff103ceda107c362c66c2adc1997ba (patch)
tree46b20f9d0436374f94bc03d893a1969c9a5dd9b1 /Source/cmTargetPropCommandBase.cxx
parent4201a11c2b5a5bdb442f99f88a5f17d6ae7c4a4c (diff)
downloadcmake-9f64974f5eff103ceda107c362c66c2adc1997ba.tar.gz
cmTargetPropCommandBase: skip property setting if there's nothing to add
Some target types don't allow setting certain properties even if there is no value being set there. Guard against this by avoiding property setting when there is nothing to add.
Diffstat (limited to 'Source/cmTargetPropCommandBase.cxx')
-rw-r--r--Source/cmTargetPropCommandBase.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmTargetPropCommandBase.cxx b/Source/cmTargetPropCommandBase.cxx
index 9a8fd96f1f..cd82299c00 100644
--- a/Source/cmTargetPropCommandBase.cxx
+++ b/Source/cmTargetPropCommandBase.cxx
@@ -112,6 +112,9 @@ bool cmTargetPropCommandBase::PopulateTargetProperies(
const std::string& scope, const std::vector<std::string>& content,
bool prepend, bool system)
{
+ if (content.empty()) {
+ return true;
+ }
if (scope == "PRIVATE" || scope == "PUBLIC") {
if (!this->HandleDirectContent(this->Target, content, prepend, system)) {
return false;