From b0f830ced6552b055bc73de470a4631aa3a14430 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 17 Jun 2021 08:25:04 -0400 Subject: VS: Do not apply any '/external:*' flag table mapping on VS < 16.10 Since commit 887e9df0c7 (VS: Update v142 CL flag table for VS 16.10, 2021-06-04) we map several `/external:*` flags to their corresponding `.vcxproj` elements. These elements were added to `cl.xml` in VS 16.10, so filter them out in older VS versions. Add a field to the json flag table format to specify the minimum version of VS needed for a given mapping. Issue: #22308 --- Templates/MSBuild/FlagTables/v142_CL.json | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Templates') diff --git a/Templates/MSBuild/FlagTables/v142_CL.json b/Templates/MSBuild/FlagTables/v142_CL.json index 650ff6c180..c21a3def6a 100644 --- a/Templates/MSBuild/FlagTables/v142_CL.json +++ b/Templates/MSBuild/FlagTables/v142_CL.json @@ -572,6 +572,7 @@ "switch": "external:W0", "comment": "Turn Off All Warnings", "value": "TurnOffAllWarnings", + "vsmin": "16.10.31321.278", "flags": [] }, { @@ -579,6 +580,7 @@ "switch": "external:W1", "comment": "Level1", "value": "Level1", + "vsmin": "16.10.31321.278", "flags": [] }, { @@ -586,6 +588,7 @@ "switch": "external:W2", "comment": "Level2", "value": "Level2", + "vsmin": "16.10.31321.278", "flags": [] }, { @@ -593,6 +596,7 @@ "switch": "external:W3", "comment": "Level3", "value": "Level3", + "vsmin": "16.10.31321.278", "flags": [] }, { @@ -600,6 +604,7 @@ "switch": "external:W4", "comment": "Level4", "value": "Level4", + "vsmin": "16.10.31321.278", "flags": [] }, { @@ -1141,6 +1146,7 @@ "switch": "external:anglebrackets", "comment": "Treat Files Included with Angle Brackets as External", "value": "true", + "vsmin": "16.10.31321.278", "flags": [] }, { @@ -1148,6 +1154,7 @@ "switch": "external:templates-", "comment": "Template Diagnostics in External Headers", "value": "true", + "vsmin": "16.10.31321.278", "flags": [] }, { @@ -1277,6 +1284,7 @@ "switch": "external:env:", "comment": "External Directories Environment Variables", "value": "", + "vsmin": "16.10.31321.278", "flags": [ "UserValue", "SemicolonAppendable" -- cgit v1.2.1