diff options
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 70005b4..2d34747 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1748,9 +1748,12 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) else if (prop == "LINK_LIBRARIES") { this->Internal->LinkImplementationPropertyEntries.clear(); - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - cmValueWithOrigin entry(value, lfbt); - this->Internal->LinkImplementationPropertyEntries.push_back(entry); + if (value) + { + cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); + cmValueWithOrigin entry(value, lfbt); + this->Internal->LinkImplementationPropertyEntries.push_back(entry); + } } else if (prop == "SOURCES") { @@ -1834,9 +1837,12 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, } else if (prop == "LINK_LIBRARIES") { - cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - cmValueWithOrigin entry(value, lfbt); - this->Internal->LinkImplementationPropertyEntries.push_back(entry); + if (value) + { + cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); + cmValueWithOrigin entry(value, lfbt); + this->Internal->LinkImplementationPropertyEntries.push_back(entry); + } } else if (prop == "SOURCES") { |