From 9f64974f5eff103ceda107c362c66c2adc1997ba Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Fri, 26 Oct 2018 09:14:44 -0400 Subject: 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. --- Source/cmTargetPropCommandBase.cxx | 3 +++ 1 file changed, 3 insertions(+) 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& 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; -- cgit v0.12