diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-09-10 20:58:04 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-09-11 16:30:46 (GMT) |
commit | 08ce3f486e789275104a390d2d34f36a90c5fd2f (patch) | |
tree | 1fae913a063920f9613a62149a2ff366799246ff /Source/cmTarget.cxx | |
parent | 8e8824149fb6525f1a6da5f9c825a67765ce240b (diff) | |
download | CMake-08ce3f486e789275104a390d2d34f36a90c5fd2f.zip CMake-08ce3f486e789275104a390d2d34f36a90c5fd2f.tar.gz CMake-08ce3f486e789275104a390d2d34f36a90c5fd2f.tar.bz2 |
cmTarget: Only append non-empty values to buildsystem properties.
This is a change in behavior from CMake 3.3, but there is no semantic meaning
to empty entries in buildsystem properties. This also restores behavior to
that of CMake 2.8.10.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 3425f34..2dfa19c 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1706,7 +1706,7 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, } else if(prop == "INCLUDE_DIRECTORIES") { - if (value) + if (value && *value) { this->Internal->IncludeDirectoriesEntries.push_back(value); cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); @@ -1715,7 +1715,7 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, } else if(prop == "COMPILE_OPTIONS") { - if (value) + if (value && *value) { this->Internal->CompileOptionsEntries.push_back(value); cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); @@ -1724,7 +1724,7 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, } else if(prop == "COMPILE_FEATURES") { - if (value) + if (value && *value) { this->Internal->CompileFeaturesEntries.push_back(value); cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); @@ -1733,7 +1733,7 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, } else if(prop == "COMPILE_DEFINITIONS") { - if (value) + if (value && *value) { this->Internal->CompileDefinitionsEntries.push_back(value); cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); @@ -1749,7 +1749,7 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, } else if (prop == "LINK_LIBRARIES") { - if (value) + if (value && *value) { cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); cmValueWithOrigin entry(value, lfbt); |