summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorTarget.cxx15
-rw-r--r--Source/cmGeneratorTarget.h2
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx7
3 files changed, 15 insertions, 9 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 47d685d..39336b2 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -112,7 +112,7 @@ struct IDLSourcesTag
struct ResxTag
{
};
-struct ModuleDefinitionFileTag
+struct ModuleDefinitionSourcesTag
{
};
struct AppManifestTag
@@ -236,8 +236,8 @@ struct TagVisitor
} else if (!sf->GetLanguage().empty()) {
DoAccept<IsSameTag<Tag, ObjectSourcesTag>::Result>::Do(this->Data, sf);
} else if (ext == "def") {
- DoAccept<IsSameTag<Tag, ModuleDefinitionFileTag>::Result>::Do(this->Data,
- sf);
+ DoAccept<IsSameTag<Tag, ModuleDefinitionSourcesTag>::Result>::Do(
+ this->Data, sf);
if (this->IsObjLib) {
this->BadObjLibFiles.push_back(sf);
}
@@ -681,6 +681,12 @@ bool cmGeneratorTarget::HasExplicitObjectName(cmSourceFile const* file) const
return it != this->ExplicitObjectName.end();
}
+void cmGeneratorTarget::GetModuleDefinitionSources(
+ std::vector<cmSourceFile const*>& data, const std::string& config) const
+{
+ IMPLEMENT_VISIT(ModuleDefinitionSources);
+}
+
void cmGeneratorTarget::GetIDLSources(std::vector<cmSourceFile const*>& data,
const std::string& config) const
{
@@ -1942,8 +1948,7 @@ cmSourceFile const* cmGeneratorTarget::GetModuleDefinitionFile(
const std::string& config) const
{
std::vector<cmSourceFile const*> data;
- IMPLEMENT_VISIT_IMPL(ModuleDefinitionFile,
- COMMA std::vector<cmSourceFile const*>)
+ this->GetModuleDefinitionSources(data, config);
if (!data.empty()) {
return data.front();
}
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index e72e0a6..ea36e16 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -77,6 +77,8 @@ public:
bool HasExplicitObjectName(cmSourceFile const* file) const;
void AddExplicitObjectName(cmSourceFile const* sf);
+ void GetModuleDefinitionSources(std::vector<cmSourceFile const*>&,
+ const std::string& config) const;
void GetResxSources(std::vector<cmSourceFile const*>&,
const std::string& config) const;
void GetIDLSources(std::vector<cmSourceFile const*>&,
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index fbf7447..a5b1edf 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1841,10 +1841,9 @@ void cmVisualStudio10TargetGenerator::WriteAllSources()
(*this->BuildFileStream) << cmVS10EscapeXML(obj) << "\" />\n";
}
- if (cmSourceFile const* defsrc =
- this->GeneratorTarget->GetModuleDefinitionFile("")) {
- this->WriteSource("None", defsrc);
- }
+ std::vector<cmSourceFile const*> defSources;
+ this->GeneratorTarget->GetModuleDefinitionSources(defSources, "");
+ this->WriteSources("None", defSources);
if (this->IsMissingFiles) {
this->WriteMissingFiles();