diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-11-05 16:00:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-11-05 16:07:39 (GMT) |
commit | f6e7d5f3a00eee04834840a9534d19445fd3ab8f (patch) | |
tree | 13f730473cd908d4d8f4673ff5ea78987385bf5a /Source/cmMakefile.cxx | |
parent | c43b0505a5806ce38274899cc09f42d3fd7d72ee (diff) | |
download | CMake-f6e7d5f3a00eee04834840a9534d19445fd3ab8f.zip CMake-f6e7d5f3a00eee04834840a9534d19445fd3ab8f.tar.gz CMake-f6e7d5f3a00eee04834840a9534d19445fd3ab8f.tar.bz2 |
Reduce the scope of temporary cmProp variables and other improvements
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 56b7ae1..50a7d27 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1482,15 +1482,14 @@ void cmMakefile::InitializeFromParent(cmMakefile* parent) // Include transform property. There is no per-config version. { const char* prop = "IMPLICIT_DEPENDS_INCLUDE_TRANSFORM"; - cmProp p = parent->GetProperty(prop); - this->SetProperty(prop, cmToCStr(p)); + this->SetProperty(prop, cmToCStr(parent->GetProperty(prop))); } // compile definitions property and per-config versions cmPolicies::PolicyStatus polSt = this->GetPolicyStatus(cmPolicies::CMP0043); if (polSt == cmPolicies::WARN || polSt == cmPolicies::OLD) { - cmProp p = parent->GetProperty("COMPILE_DEFINITIONS"); - this->SetProperty("COMPILE_DEFINITIONS", cmToCStr(p)); + this->SetProperty("COMPILE_DEFINITIONS", + cmToCStr(parent->GetProperty("COMPILE_DEFINITIONS"))); std::vector<std::string> configs = this->GetGeneratorConfigs(cmMakefile::ExcludeEmptyConfig); for (std::string const& config : configs) { @@ -1502,12 +1501,11 @@ void cmMakefile::InitializeFromParent(cmMakefile* parent) } // labels - cmProp p = parent->GetProperty("LABELS"); - this->SetProperty("LABELS", cmToCStr(p)); + this->SetProperty("LABELS", cmToCStr(parent->GetProperty("LABELS"))); // link libraries - p = parent->GetProperty("LINK_LIBRARIES"); - this->SetProperty("LINK_LIBRARIES", cmToCStr(p)); + this->SetProperty("LINK_LIBRARIES", + cmToCStr(parent->GetProperty("LINK_LIBRARIES"))); // the initial project name this->StateSnapshot.SetProjectName(parent->StateSnapshot.GetProjectName()); |