summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-06-28 12:59:56 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2009-06-28 12:59:56 (GMT)
commit07eb80d9104402e00355af7cce7192df7f4819ef (patch)
treec062b26cc1c72f82b68cee2d010bd1b17e5fd2a0 /Source/cmVisualStudio10TargetGenerator.cxx
parentb1e1dc64656eac40e88a44672aff566150cfe247 (diff)
downloadCMake-07eb80d9104402e00355af7cce7192df7f4819ef.zip
CMake-07eb80d9104402e00355af7cce7192df7f4819ef.tar.gz
CMake-07eb80d9104402e00355af7cce7192df7f4819ef.tar.bz2
ENH: fix line length
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx37
1 files changed, 31 insertions, 6 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 4c9d289..cd96a75 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -26,6 +26,7 @@
#include "cmVS10CLFlagTable.h"
#include "cmVS10LinkFlagTable.h"
+#include "cmVS10LibFlagTable.h"
@@ -395,8 +396,8 @@ void cmVisualStudio10TargetGenerator::WriteCLSources()
for(std::vector<cmSourceFile*>::const_iterator source = sources.begin();
source != sources.end(); ++source)
{
- // if it is not a custom command then add it as a c file,
- // TODO: need to check for idl or rc, or exclude from build
+ // if it is not a custom command then add it as a c/c++ file,
+ // TODO: need to check for idl or rc
if(!(*source)->GetCustomCommand()
&& !(*source)->GetPropertyAsBool("HEADER_FILE_ONLY")
&& !this->GlobalGenerator->IgnoreFile
@@ -508,8 +509,8 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
clOptions.SetConfiguration((*config).c_str());
clOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
clOptions.OutputFlagMap(*this->BuildFileStream, " ");
- clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ",
- "\n");
+ clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream,
+ " ", "\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&
config)
{
@@ -974,9 +998,10 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups()
}
// output midl flags <Midl></Midl>
this->WriteMidlOptions(*i, includes);
- // output link flags <Link></Link> or <Lib></Lib>
+ // output link flags <Link></Link>
this->WriteLinkOptions(*i);
- // TODO: need a WriteLibOptions for static
+ // output lib flags <Lib></Lib>
+ this->WriteLibOptions(*i);
this->WriteString("</ItemDefinitionGroup>\n", 1);
}
}