diff options
author | Brad King <brad.king@kitware.com> | 2015-07-09 13:17:17 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-07-09 13:17:17 (GMT) |
commit | 6b4fccd1a69b7da0cadb50026d3a5056c5fc0b05 (patch) | |
tree | 2f039218855297f65dab5d61a403ec4c29c56ea1 /Source | |
parent | 53f8ef66a55fd5ad5359f1100ef96b1af9d3bf23 (diff) | |
parent | 7aa9e80e35f62ec5686d08b49ebe8b57cbc6cbc6 (diff) | |
download | CMake-6b4fccd1a69b7da0cadb50026d3a5056c5fc0b05.zip CMake-6b4fccd1a69b7da0cadb50026d3a5056c5fc0b05.tar.gz CMake-6b4fccd1a69b7da0cadb50026d3a5056c5fc0b05.tar.bz2 |
Merge topic 'empty-LINK_LIBRARIES'
7aa9e80e set_property: Fix crash when setting LINK_LIBRARIES to nothing
Diffstat (limited to 'Source')
-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 d309927..3353fbd 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1739,9 +1739,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") { @@ -1825,9 +1828,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") { |