Commit b1d67ae8 authored by Brad King's avatar Brad King

VS: Split flag table between v140 and v141 toolsets

In commit v3.7.0-rc1~156^2~1 (VS: Update v140 flag tables from VS 15
MSBuild files, 2016-09-02) we extended the v140 flag table with values
from the v141 toolset that comes with VS 15.  However, the v140 toolset
that comes with VS 14 does not have all of these entries and so the
flags just need to be passed without special mapping.  In order to
support both toolsets, split our CL flag table into separate copies for
each version and switch off the toolset name.

Closes: #16352
parent b99bbfe8
Pipeline #30389 passed with stage
This diff is collapsed.
static cmVS7FlagTable cmVS14CLFlagTable[] = {
static cmVS7FlagTable cmVS141CLFlagTable[] = {
// Enum Properties
{ "DebugInformationFormat", "", "None", "None", 0 },
......@@ -25,7 +25,8 @@
#include "cmVS12LinkFlagTable.h"
#include "cmVS12MASMFlagTable.h"
#include "cmVS12RCFlagTable.h"
#include "cmVS14CLFlagTable.h"
#include "cmVS140CLFlagTable.h"
#include "cmVS141CLFlagTable.h"
#include "cmVS14LibFlagTable.h"
#include "cmVS14LinkFlagTable.h"
#include "cmVS14MASMFlagTable.h"
......@@ -43,7 +44,13 @@ cmIDEFlagTable const* cmVisualStudio10TargetGenerator::GetClFlagTable() const
cmGlobalVisualStudioGenerator::VSVersion v =
if (v >= cmGlobalVisualStudioGenerator::VS14) {
return cmVS14CLFlagTable;
// FIXME: All flag table selection should be based on the toolset name.
// See issue #16153. For now, treat VS 15's toolset as a special case.
const char* toolset = this->GlobalGenerator->GetPlatformToolset();
if (toolset && cmHasLiteralPrefix(toolset, "v141")) {
return cmVS141CLFlagTable;
return cmVS140CLFlagTable;
} else if (v >= cmGlobalVisualStudioGenerator::VS12) {
return cmVS12CLFlagTable;
} else if (v == cmGlobalVisualStudioGenerator::VS11) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment