diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2018-10-26 09:14:44 -0400 |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2018-10-26 12:08:16 -0400 |
commit | 9f64974f5eff103ceda107c362c66c2adc1997ba (patch) | |
tree | 46b20f9d0436374f94bc03d893a1969c9a5dd9b1 /Source/cmTargetPropCommandBase.cxx | |
parent | 4201a11c2b5a5bdb442f99f88a5f17d6ae7c4a4c (diff) | |
download | cmake-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.cxx | 3 |
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; |