diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2018-10-26 13:14:44 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2018-10-26 16:08:16 (GMT) |
commit | 9f64974f5eff103ceda107c362c66c2adc1997ba (patch) | |
tree | 46b20f9d0436374f94bc03d893a1969c9a5dd9b1 /Source/cmTargetPropCommandBase.cxx | |
parent | 4201a11c2b5a5bdb442f99f88a5f17d6ae7c4a4c (diff) | |
download | CMake-9f64974f5eff103ceda107c362c66c2adc1997ba.zip CMake-9f64974f5eff103ceda107c362c66c2adc1997ba.tar.gz CMake-9f64974f5eff103ceda107c362c66c2adc1997ba.tar.bz2 |
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 9a8fd96..cd82299 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; |