summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/release/dev/vs-flag-order.rst9
-rw-r--r--Source/cmVisualStudioGeneratorOptions.cxx5
2 files changed, 12 insertions, 2 deletions
diff --git a/Help/release/dev/vs-flag-order.rst b/Help/release/dev/vs-flag-order.rst
new file mode 100644
index 0000000..21cea37
--- /dev/null
+++ b/Help/release/dev/vs-flag-order.rst
@@ -0,0 +1,9 @@
+vs-flag-order
+-------------
+
+* The :ref:`Visual Studio Generators` for VS 2010 and above now place
+ per-source file flags after target-wide flags when they are classified
+ as raw flags with no project file setting (``AdditionalOptions``).
+ This behavior is more consistent with the ordering of flags produced
+ by other generators, and allows flags on more-specific properties
+ (per-source) to override those on more general ones (per-target).
diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx
index 4be183d..e751bfc 100644
--- a/Source/cmVisualStudioGeneratorOptions.cxx
+++ b/Source/cmVisualStudioGeneratorOptions.cxx
@@ -334,8 +334,9 @@ void cmVisualStudioGeneratorOptions::OutputAdditionalOptions(
} else {
fout << "<AdditionalOptions>";
}
- fout << cmVisualStudio10GeneratorOptionsEscapeForXML(this->FlagString)
- << " %(AdditionalOptions)</AdditionalOptions>\n";
+ fout << "%(AdditionalOptions) "
+ << cmVisualStudio10GeneratorOptionsEscapeForXML(this->FlagString)
+ << "</AdditionalOptions>\n";
} else {
fout << prefix << "AdditionalOptions=\"";
fout << cmVisualStudioGeneratorOptionsEscapeForXML(this->FlagString);