summaryrefslogtreecommitdiff
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2020-01-25 10:37:00 -0500
committerVitaly Stakhovsky <vvs31415@gitlab.org>2020-01-25 10:37:00 -0500
commit1398517f315b2b0420972df1dc1e61294ea5f749 (patch)
tree91d5278f549d2f49a441e127215c8ca0896586b6 /Source/cmTarget.cxx
parent33e7bd66c09ee51edbbccfc1014813e30d80ec5f (diff)
downloadcmake-1398517f315b2b0420972df1dc1e61294ea5f749.tar.gz
AppendProperty: convert value param to std::string
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index d46bf56c46..15e200f220 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1297,8 +1297,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(),
@@ -1333,37 +1333,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);
@@ -1377,13 +1377,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);