ENH: fix line length

This commit is contained in:
Bill Hoffman 2009-06-28 08:59:56 -04:00
parent b1e1dc6465
commit 07eb80d910
1 changed files with 31 additions and 6 deletions

View File

@ -26,6 +26,7 @@
#include "cmVS10CLFlagTable.h" #include "cmVS10CLFlagTable.h"
#include "cmVS10LinkFlagTable.h" #include "cmVS10LinkFlagTable.h"
#include "cmVS10LibFlagTable.h"
@ -395,8 +396,8 @@ void cmVisualStudio10TargetGenerator::WriteCLSources()
for(std::vector<cmSourceFile*>::const_iterator source = sources.begin(); for(std::vector<cmSourceFile*>::const_iterator source = sources.begin();
source != sources.end(); ++source) source != sources.end(); ++source)
{ {
// if it is not a custom command then add it as a c file, // if it is not a custom command then add it as a c/c++ file,
// TODO: need to check for idl or rc, or exclude from build // TODO: need to check for idl or rc
if(!(*source)->GetCustomCommand() if(!(*source)->GetCustomCommand()
&& !(*source)->GetPropertyAsBool("HEADER_FILE_ONLY") && !(*source)->GetPropertyAsBool("HEADER_FILE_ONLY")
&& !this->GlobalGenerator->IgnoreFile && !this->GlobalGenerator->IgnoreFile
@ -508,8 +509,8 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
clOptions.SetConfiguration((*config).c_str()); clOptions.SetConfiguration((*config).c_str());
clOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", ""); clOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
clOptions.OutputFlagMap(*this->BuildFileStream, " "); clOptions.OutputFlagMap(*this->BuildFileStream, " ");
clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ", clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream,
"\n"); " ", "\n");
} }
} }
@ -740,6 +741,29 @@ WriteRCOptions(std::string const& ,
} }
void cmVisualStudio10TargetGenerator::WriteLibOptions(std::string const&
)
{
if(this->Target->GetType() != cmTarget::STATIC_LIBRARY)
{
return;
}
if(const char* libflags = this->Target
->GetProperty("STATIC_LIBRARY_FLAGS"))
{
this->WriteString("<Lib>\n", 2);
cmVisualStudioGeneratorOptions
libOptions(this->LocalGenerator,
10, cmVisualStudioGeneratorOptions::Compiler,
cmVS10LibFlagTable, 0, this);
libOptions.Parse(libflags);
libOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
libOptions.OutputFlagMap(*this->BuildFileStream, " ");
this->WriteString("</Lib>\n", 2);
}
}
void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const& void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const&
config) config)
{ {
@ -974,9 +998,10 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups()
} }
// output midl flags <Midl></Midl> // output midl flags <Midl></Midl>
this->WriteMidlOptions(*i, includes); this->WriteMidlOptions(*i, includes);
// output link flags <Link></Link> or <Lib></Lib> // output link flags <Link></Link>
this->WriteLinkOptions(*i); this->WriteLinkOptions(*i);
// TODO: need a WriteLibOptions for static // output lib flags <Lib></Lib>
this->WriteLibOptions(*i);
this->WriteString("</ItemDefinitionGroup>\n", 1); this->WriteString("</ItemDefinitionGroup>\n", 1);
} }
} }