From b6d022f853b5eede9f15c6d61ea5fa896a139f90 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 25 Jun 2009 22:53:02 -0400 Subject: ENH: add obj file support and remove a warning --- Source/cmVisualStudio10TargetGenerator.cxx | 45 ++++++++++++++++++++++++------ Source/cmVisualStudio10TargetGenerator.h | 3 +- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index d08c676..f3d01e7 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -142,7 +142,8 @@ void cmVisualStudio10TargetGenerator::Generate() this->WritePathAndIncrementalLinkOptions(); this->WriteItemDefinitionGroups(); this->WriteCustomCommands(); - this->WriteSources(); + this->WriteObjSources(); + this->WriteCLSources(); this->WriteProjectReferences(); this->WriteString( "Target->GetType() > cmTarget::MODULE_LIBRARY) + { + return; + } + bool first = true; + std::vectorconst & sources = this->Target->GetSourceFiles(); + for(std::vector::const_iterator source = sources.begin(); + source != sources.end(); ++source) + { + std::cerr << (*source)->GetExtension() << "\n"; + std::cerr << (*source)->GetFullPath() << "\n"; + if((*source)->GetExtension() == "obj") + { + if(first) + { + this->WriteString("\n", 1); + first = false; + } + this->WriteString("BuildFileStream ) << (*source)->GetFullPath() << "\" />\n"; + } + } + if(!first) + { + this->WriteString("\n", 1); + } +} + + +void cmVisualStudio10TargetGenerator::WriteCLSources() { this->WriteString("\n", 1); if(this->Target->GetType() > cmTarget::MODULE_LIBRARY) @@ -590,8 +622,7 @@ OutputLinkIncremental(std::string const& configName) void cmVisualStudio10TargetGenerator:: -WriteClOptions(std::string const& - configName, +WriteClOptions(std::string const& configName, std::vector const & includes) { @@ -699,7 +730,7 @@ OutputIncludes(std::vector const & includes) void cmVisualStudio10TargetGenerator:: -WriteRCOptions(std::string const& config, +WriteRCOptions(std::string const& , std::vector const & includes) { this->WriteString("\n", 2); @@ -898,8 +929,7 @@ void cmVisualStudio10TargetGenerator::AddLibraries( void cmVisualStudio10TargetGenerator:: -WriteMidlOptions(std::string const& - config, +WriteMidlOptions(std::string const& /*config*/, std::vector const & includes) { this->WriteString("\n", 2); @@ -949,7 +979,6 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups() } } -// TODO handle .obj file direct stuff void cmVisualStudio10TargetGenerator::WriteProjectReferences() { diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index 618b993..71662f0 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -49,7 +49,8 @@ private: void WriteString(const char* line, int indentLevel); void WriteProjectConfigurations(); void WriteProjectConfigurationValues(); - void WriteSources(); + void WriteCLSources(); + void WriteObjSources(); void WritePathAndIncrementalLinkOptions(); void WriteItemDefinitionGroups(); void WriteClOptions(std::string const& config, -- cgit v0.12