summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-02-15 15:40:00 (GMT)
committerBrad King <brad.king@kitware.com>2017-02-15 15:41:36 (GMT)
commit109b8a6fd32be9886de71f98170e0c512ac9883f (patch)
tree092fe04e949e31e691bae6b18f4b69fe9ca08fe4 /Source/cmVisualStudio10TargetGenerator.cxx
parentbd5ea6993c8376cd3612100019e15ee256a758d8 (diff)
downloadCMake-109b8a6fd32be9886de71f98170e0c512ac9883f.zip
CMake-109b8a6fd32be9886de71f98170e0c512ac9883f.tar.gz
CMake-109b8a6fd32be9886de71f98170e0c512ac9883f.tar.bz2
VS: Refactor AdditionalOptions generation
Store unknown flags directly in a flag map entry for `AdditionalOptions` instead of having a separate member for them. This avoids duplicating the output generation logic for the entry.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index f084e19..e3853ed 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1939,7 +1939,7 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
}
clOptions.AddDefines(configDefines.c_str());
clOptions.SetConfiguration((*config).c_str());
- clOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
+ clOptions.PrependInheritedString("AdditionalOptions");
clOptions.OutputFlagMap(*this->BuildFileStream, " ");
clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ",
"\n", lang);
@@ -2293,7 +2293,7 @@ void cmVisualStudio10TargetGenerator::WriteClOptions(
return;
}
this->WriteString("<ClCompile>\n", 2);
- clOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
+ clOptions.PrependInheritedString("AdditionalOptions");
clOptions.AppendFlag("AdditionalIncludeDirectories", includes);
clOptions.AppendFlag("AdditionalIncludeDirectories",
"%(AdditionalIncludeDirectories)");
@@ -2395,8 +2395,8 @@ void cmVisualStudio10TargetGenerator::WriteRCOptions(
rcOptions.AppendFlag("AdditionalIncludeDirectories", includes);
rcOptions.AppendFlag("AdditionalIncludeDirectories",
"%(AdditionalIncludeDirectories)");
+ rcOptions.PrependInheritedString("AdditionalOptions");
rcOptions.OutputFlagMap(*this->BuildFileStream, " ");
- rcOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
this->WriteString("</ResourceCompile>\n", 2);
}
@@ -2453,8 +2453,8 @@ void cmVisualStudio10TargetGenerator::WriteMasmOptions(
Options& masmOptions = *(this->MasmOptions[configName]);
masmOptions.AppendFlag("IncludePaths", includes);
masmOptions.AppendFlag("IncludePaths", "%(IncludePaths)");
+ masmOptions.PrependInheritedString("AdditionalOptions");
masmOptions.OutputFlagMap(*this->BuildFileStream, " ");
- masmOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
this->WriteString("</MASM>\n", 2);
}
@@ -2512,7 +2512,7 @@ void cmVisualStudio10TargetGenerator::WriteNasmOptions(
nasmOptions.AppendFlag("IncludePaths", includes);
nasmOptions.AppendFlag("IncludePaths", "%(IncludePaths)");
nasmOptions.OutputFlagMap(*this->BuildFileStream, " ");
- nasmOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
+ nasmOptions.PrependInheritedString("AdditionalOptions");
nasmOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ",
"\n", "ASM_NASM");
@@ -2542,7 +2542,7 @@ void cmVisualStudio10TargetGenerator::WriteLibOptions(
this->LocalGenerator, cmVisualStudioGeneratorOptions::Linker,
gg->GetLibFlagTable(), 0, this);
libOptions.Parse(libflags.c_str());
- libOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
+ libOptions.PrependInheritedString("AdditionalOptions");
libOptions.OutputFlagMap(*this->BuildFileStream, " ");
this->WriteString("</Lib>\n", 2);
}
@@ -3019,7 +3019,7 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(
Options& linkOptions = *(this->LinkOptions[config]);
this->WriteString("<Link>\n", 2);
- linkOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", "");
+ linkOptions.PrependInheritedString("AdditionalOptions");
linkOptions.OutputFlagMap(*this->BuildFileStream, " ");
this->WriteString("</Link>\n", 2);