mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 00:11:07 -06:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user