VS: Refactor handling of "header" sources in VS >= 10
Create a WriteHeaderSource method to handle writing of sources classified by cmGeneratorTarget as header files. This will be useful to add special VS-specific handling for some headers.
This commit is contained in:
parent
2df389115e
commit
c2ef6d238a
|
@ -997,6 +997,11 @@ WriteGroupSources(const char* name,
|
|||
this->WriteString("</ItemGroup>\n", 1);
|
||||
}
|
||||
|
||||
void cmVisualStudio10TargetGenerator::WriteHeaderSource(cmSourceFile const* sf)
|
||||
{
|
||||
this->WriteSource("ClInclude", sf);
|
||||
}
|
||||
|
||||
void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
|
||||
{
|
||||
this->WriteSource("None", sf);
|
||||
|
@ -1079,7 +1084,11 @@ void cmVisualStudio10TargetGenerator::WriteAllSources()
|
|||
|
||||
std::vector<cmSourceFile const*> headerSources;
|
||||
this->GeneratorTarget->GetHeaderSources(headerSources, "");
|
||||
this->WriteSources("ClInclude", headerSources);
|
||||
for(std::vector<cmSourceFile const*>::const_iterator
|
||||
si = headerSources.begin(); si != headerSources.end(); ++si)
|
||||
{
|
||||
this->WriteHeaderSource(*si);
|
||||
}
|
||||
std::vector<cmSourceFile const*> idlSources;
|
||||
this->GeneratorTarget->GetIDLSources(idlSources, "");
|
||||
this->WriteSources("Midl", idlSources);
|
||||
|
|
|
@ -57,6 +57,7 @@ private:
|
|||
void WriteProjectConfigurations();
|
||||
void WriteProjectConfigurationValues();
|
||||
void WriteMSToolConfigurationValues(std::string const& config);
|
||||
void WriteHeaderSource(cmSourceFile const* sf);
|
||||
void WriteExtraSource(cmSourceFile const* sf);
|
||||
void WriteSource(std::string const& tool, cmSourceFile const* sf,
|
||||
const char* end = 0);
|
||||
|
|
Loading…
Reference in New Issue