summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmGeneratorTarget.cxx19
-rw-r--r--Source/cmGeneratorTarget.h2
2 files changed, 10 insertions, 11 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 4baec03..7dd8e7f 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -468,9 +468,8 @@ std::string cmGeneratorTarget::GetOutputName(const std::string& config,
return i->second;
}
-void cmGeneratorTarget::AddSource(const std::string& src)
+void cmGeneratorTarget::AddSourceCommon(const std::string& src)
{
- this->Target->AddSource(src);
cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
cmGeneratorExpression ge(lfbt);
CM_AUTO_PTR<cmCompiledGeneratorExpression> cge = ge.Parse(src);
@@ -480,19 +479,17 @@ void cmGeneratorTarget::AddSource(const std::string& src)
this->LinkImplementationLanguageIsContextDependent = true;
}
+void cmGeneratorTarget::AddSource(const std::string& src)
+{
+ this->Target->AddSource(src);
+ this->AddSourceCommon(src);
+}
+
void cmGeneratorTarget::AddTracedSources(std::vector<std::string> const& srcs)
{
this->Target->AddTracedSources(srcs);
if (!srcs.empty()) {
- std::string srcFiles = cmJoin(srcs, ";");
- this->SourceFilesMap.clear();
- this->LinkImplementationLanguageIsContextDependent = true;
- cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
- cmGeneratorExpression ge(lfbt);
- CM_AUTO_PTR<cmCompiledGeneratorExpression> cge = ge.Parse(srcFiles);
- cge->SetEvaluateForBuildsystem(true);
- this->SourceEntries.push_back(
- new cmGeneratorTarget::TargetPropertyEntry(cge));
+ this->AddSourceCommon(cmJoin(srcs, ";"));
}
}
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 173f15d..715220e 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -540,6 +540,8 @@ public:
std::string GetFortranModuleDirectory() const;
private:
+ void AddSourceCommon(const std::string& src);
+
std::string CreateFortranModuleDirectory() const;
mutable bool FortranModuleDirectoryCreated;
mutable std::string FortranModuleDirectory;