diff options
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 12 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 20 | ||||
-rw-r--r-- | Source/cmMakefile.h | 3 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 7 | ||||
-rw-r--r-- | Source/cmTarget.h | 3 |
5 files changed, 24 insertions, 21 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 88ac0bc..2c5ed4f 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1417,8 +1417,10 @@ void cmGlobalGenerator::FinalizeTargetCompileInfo() { cmMakefile *mf = this->LocalGenerators[i]->GetMakefile(); - const std::vector<cmValueWithOrigin> noconfig_compile_definitions = + const std::vector<std::string> noconfig_compile_definitions = mf->GetCompileDefinitionsEntries(); + const std::vector<cmListFileBacktrace> noconfig_compile_definitions_bts = + mf->GetCompileDefinitionsBacktraces(); cmTargets& targets = mf->GetTargets(); for(cmTargets::iterator ti = targets.begin(); @@ -1433,11 +1435,13 @@ void cmGlobalGenerator::FinalizeTargetCompileInfo() continue; } - for (std::vector<cmValueWithOrigin>::const_iterator it + std::vector<cmListFileBacktrace>::const_iterator btIt + = noconfig_compile_definitions_bts.begin(); + for (std::vector<std::string>::const_iterator it = noconfig_compile_definitions.begin(); - it != noconfig_compile_definitions.end(); ++it) + it != noconfig_compile_definitions.end(); ++it, ++btIt) { - t->InsertCompileDefinition(*it); + t->InsertCompileDefinition(*it, *btIt); } cmPolicies::PolicyStatus polSt diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index dc8d983..c705e7d 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -303,19 +303,15 @@ std::vector<cmValueWithOrigin> cmMakefile::GetCompileOptionsEntries() const return entries; } -std::vector<cmValueWithOrigin> cmMakefile::GetCompileDefinitionsEntries() const +std::vector<std::string> cmMakefile::GetCompileDefinitionsEntries() const { - std::vector<cmValueWithOrigin> entries; - entries.reserve(this->CompileDefinitionsEntries.size()); - std::vector<cmListFileBacktrace>::const_iterator btIt = - this->CompileDefinitionsEntryBacktraces.begin(); - for(std::vector<std::string>::const_iterator it = - this->CompileDefinitionsEntries.begin(); - it != this->CompileDefinitionsEntries.end(); ++it, ++btIt) - { - entries.push_back(cmValueWithOrigin(*it, *btIt)); - } - return entries; + return this->CompileDefinitionsEntries; +} + +std::vector<cmListFileBacktrace> +cmMakefile::GetCompileDefinitionsBacktraces() const +{ + return this->CompileDefinitionsEntryBacktraces; } //---------------------------------------------------------------------------- diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 57dcdb6..e69ce1e 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -748,7 +748,8 @@ public: std::vector<cmValueWithOrigin> GetIncludeDirectoriesEntries() const; std::vector<cmValueWithOrigin> GetCompileOptionsEntries() const; - std::vector<cmValueWithOrigin> GetCompileDefinitionsEntries() const; + std::vector<std::string> GetCompileDefinitionsEntries() const; + std::vector<cmListFileBacktrace> GetCompileDefinitionsBacktraces() const; bool IsConfigured() const { return this->Configured; } void SetConfigured(){ this->Configured = true; } diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index ac39387..906517b 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1954,12 +1954,13 @@ void cmTarget::InsertCompileOption(const cmValueWithOrigin &entry, } //---------------------------------------------------------------------------- -void cmTarget::InsertCompileDefinition(const cmValueWithOrigin &entry) +void cmTarget::InsertCompileDefinition(std::string const& entry, + cmListFileBacktrace const& bt) { - cmGeneratorExpression ge(entry.Backtrace); + cmGeneratorExpression ge(bt); this->Internal->CompileDefinitionsEntries.push_back( - new cmTargetInternals::TargetPropertyEntry(ge.Parse(entry.Value))); + new cmTargetInternals::TargetPropertyEntry(ge.Parse(entry))); } //---------------------------------------------------------------------------- diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 1920312..9c98672 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -576,7 +576,8 @@ public: bool before = false); void InsertCompileOption(const cmValueWithOrigin &entry, bool before = false); - void InsertCompileDefinition(const cmValueWithOrigin &entry); + void InsertCompileDefinition(std::string const& entry, + cmListFileBacktrace const& bt); void AppendBuildInterfaceIncludes(); |