diff options
author | Brad King <brad.king@kitware.com> | 2020-01-28 15:58:42 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-01-28 16:00:16 (GMT) |
commit | e3be80f4fc1d6fedf45666b7d18dda12ef20054e (patch) | |
tree | dc46b7586ff909e3e625e9778ab2b6bb5c63e31a /Source/cmTarget.cxx | |
parent | b6da71e299ccdd202f1ea35f33cfcfeb36467e1d (diff) | |
parent | 1398517f315b2b0420972df1dc1e61294ea5f749 (diff) | |
download | CMake-e3be80f4fc1d6fedf45666b7d18dda12ef20054e.zip CMake-e3be80f4fc1d6fedf45666b7d18dda12ef20054e.tar.gz CMake-e3be80f4fc1d6fedf45666b7d18dda12ef20054e.tar.bz2 |
Merge topic 'append-std-string'
1398517f31 AppendProperty: convert value param to std::string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4282
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index c55b357..b69d4e8 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1298,8 +1298,8 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) } } -void cmTarget::AppendProperty(const std::string& prop, const char* value, - bool asString) +void cmTarget::AppendProperty(const std::string& prop, + const std::string& value, bool asString) { if (!cmTargetPropertyComputer::PassesWhitelist( this->GetType(), prop, impl->Makefile->GetMessenger(), @@ -1334,37 +1334,37 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, return; } if (prop == "INCLUDE_DIRECTORIES") { - if (value && *value) { + if (!value.empty()) { impl->IncludeDirectoriesEntries.emplace_back(value); cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); impl->IncludeDirectoriesBacktraces.push_back(lfbt); } } else if (prop == "COMPILE_OPTIONS") { - if (value && *value) { + if (!value.empty()) { impl->CompileOptionsEntries.emplace_back(value); cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); impl->CompileOptionsBacktraces.push_back(lfbt); } } else if (prop == "COMPILE_FEATURES") { - if (value && *value) { + if (!value.empty()) { impl->CompileFeaturesEntries.emplace_back(value); cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); impl->CompileFeaturesBacktraces.push_back(lfbt); } } else if (prop == "COMPILE_DEFINITIONS") { - if (value && *value) { + if (!value.empty()) { impl->CompileDefinitionsEntries.emplace_back(value); cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); impl->CompileDefinitionsBacktraces.push_back(lfbt); } } else if (prop == "LINK_OPTIONS") { - if (value && *value) { + if (!value.empty()) { impl->LinkOptionsEntries.emplace_back(value); cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); impl->LinkOptionsBacktraces.push_back(lfbt); } } else if (prop == "LINK_DIRECTORIES") { - if (value && *value) { + if (!value.empty()) { impl->LinkDirectoriesEntries.emplace_back(value); cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); impl->LinkDirectoriesBacktraces.push_back(lfbt); @@ -1378,13 +1378,13 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); return; } - if (value && *value) { + if (!value.empty()) { impl->PrecompileHeadersEntries.emplace_back(value); cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); impl->PrecompileHeadersBacktraces.push_back(lfbt); } } else if (prop == "LINK_LIBRARIES") { - if (value && *value) { + if (!value.empty()) { cmListFileBacktrace lfbt = impl->Makefile->GetBacktrace(); impl->LinkImplementationPropertyEntries.emplace_back(value); impl->LinkImplementationPropertyBacktraces.push_back(lfbt); |