diff options
author | Brad King <brad.king@kitware.com> | 2021-04-21 14:18:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-04-21 14:18:07 (GMT) |
commit | 11c0bfff89d6a3ff20129db056b6ad656004f897 (patch) | |
tree | 2b447de392f3211d8faa135f6ba0bcc6ba85b788 | |
parent | 57872e6d44ca4ea639ef5a6a712be4dd0f12710e (diff) | |
download | CMake-11c0bfff89d6a3ff20129db056b6ad656004f897.zip CMake-11c0bfff89d6a3ff20129db056b6ad656004f897.tar.gz CMake-11c0bfff89d6a3ff20129db056b6ad656004f897.tar.bz2 |
VS: Generalize CSharp /langversion flag mapping
Map the `/langversion:` flag followed by any value to a `LangVersion`
element with the specified value in the `.csproj` file.
Fixes: #22089
-rw-r--r-- | Templates/MSBuild/FlagTables/v10_CSharp.json | 51 | ||||
-rw-r--r-- | Templates/MSBuild/FlagTables/v11_CSharp.json | 51 | ||||
-rw-r--r-- | Templates/MSBuild/FlagTables/v12_CSharp.json | 51 | ||||
-rw-r--r-- | Templates/MSBuild/FlagTables/v140_CSharp.json | 51 | ||||
-rw-r--r-- | Templates/MSBuild/FlagTables/v141_CSharp.json | 51 | ||||
-rw-r--r-- | Templates/MSBuild/FlagTables/v142_CSharp.json | 51 |
6 files changed, 36 insertions, 270 deletions
diff --git a/Templates/MSBuild/FlagTables/v10_CSharp.json b/Templates/MSBuild/FlagTables/v10_CSharp.json index 5989aea..9f21d9a 100644 --- a/Templates/MSBuild/FlagTables/v10_CSharp.json +++ b/Templates/MSBuild/FlagTables/v10_CSharp.json @@ -363,52 +363,13 @@ }, { "name": "LangVersion", - "switch": "langversion:ISO-1", + "switch": "langversion:", "comment": "", - "value": "ISO-1", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:ISO-2", - "comment": "", - "value": "ISO-2", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:3", - "comment": "", - "value": "3", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:4", - "comment": "", - "value": "4", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:5", - "comment": "", - "value": "5", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:6", - "comment": "", - "value": "6", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:default", - "comment": "", - "value": "default", - "flags": [] + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] }, { "name": "DelaySign", diff --git a/Templates/MSBuild/FlagTables/v11_CSharp.json b/Templates/MSBuild/FlagTables/v11_CSharp.json index 5989aea..9f21d9a 100644 --- a/Templates/MSBuild/FlagTables/v11_CSharp.json +++ b/Templates/MSBuild/FlagTables/v11_CSharp.json @@ -363,52 +363,13 @@ }, { "name": "LangVersion", - "switch": "langversion:ISO-1", + "switch": "langversion:", "comment": "", - "value": "ISO-1", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:ISO-2", - "comment": "", - "value": "ISO-2", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:3", - "comment": "", - "value": "3", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:4", - "comment": "", - "value": "4", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:5", - "comment": "", - "value": "5", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:6", - "comment": "", - "value": "6", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:default", - "comment": "", - "value": "default", - "flags": [] + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] }, { "name": "DelaySign", diff --git a/Templates/MSBuild/FlagTables/v12_CSharp.json b/Templates/MSBuild/FlagTables/v12_CSharp.json index 5989aea..9f21d9a 100644 --- a/Templates/MSBuild/FlagTables/v12_CSharp.json +++ b/Templates/MSBuild/FlagTables/v12_CSharp.json @@ -363,52 +363,13 @@ }, { "name": "LangVersion", - "switch": "langversion:ISO-1", + "switch": "langversion:", "comment": "", - "value": "ISO-1", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:ISO-2", - "comment": "", - "value": "ISO-2", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:3", - "comment": "", - "value": "3", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:4", - "comment": "", - "value": "4", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:5", - "comment": "", - "value": "5", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:6", - "comment": "", - "value": "6", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:default", - "comment": "", - "value": "default", - "flags": [] + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] }, { "name": "DelaySign", diff --git a/Templates/MSBuild/FlagTables/v140_CSharp.json b/Templates/MSBuild/FlagTables/v140_CSharp.json index 5989aea..9f21d9a 100644 --- a/Templates/MSBuild/FlagTables/v140_CSharp.json +++ b/Templates/MSBuild/FlagTables/v140_CSharp.json @@ -363,52 +363,13 @@ }, { "name": "LangVersion", - "switch": "langversion:ISO-1", + "switch": "langversion:", "comment": "", - "value": "ISO-1", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:ISO-2", - "comment": "", - "value": "ISO-2", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:3", - "comment": "", - "value": "3", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:4", - "comment": "", - "value": "4", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:5", - "comment": "", - "value": "5", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:6", - "comment": "", - "value": "6", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:default", - "comment": "", - "value": "default", - "flags": [] + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] }, { "name": "DelaySign", diff --git a/Templates/MSBuild/FlagTables/v141_CSharp.json b/Templates/MSBuild/FlagTables/v141_CSharp.json index 5989aea..9f21d9a 100644 --- a/Templates/MSBuild/FlagTables/v141_CSharp.json +++ b/Templates/MSBuild/FlagTables/v141_CSharp.json @@ -363,52 +363,13 @@ }, { "name": "LangVersion", - "switch": "langversion:ISO-1", + "switch": "langversion:", "comment": "", - "value": "ISO-1", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:ISO-2", - "comment": "", - "value": "ISO-2", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:3", - "comment": "", - "value": "3", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:4", - "comment": "", - "value": "4", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:5", - "comment": "", - "value": "5", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:6", - "comment": "", - "value": "6", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:default", - "comment": "", - "value": "default", - "flags": [] + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] }, { "name": "DelaySign", diff --git a/Templates/MSBuild/FlagTables/v142_CSharp.json b/Templates/MSBuild/FlagTables/v142_CSharp.json index 4dcea9d..ae1bd47 100644 --- a/Templates/MSBuild/FlagTables/v142_CSharp.json +++ b/Templates/MSBuild/FlagTables/v142_CSharp.json @@ -381,52 +381,13 @@ }, { "name": "LangVersion", - "switch": "langversion:ISO-1", + "switch": "langversion:", "comment": "", - "value": "ISO-1", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:ISO-2", - "comment": "", - "value": "ISO-2", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:3", - "comment": "", - "value": "3", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:4", - "comment": "", - "value": "4", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:5", - "comment": "", - "value": "5", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:6", - "comment": "", - "value": "6", - "flags": [] - }, - { - "name": "LangVersion", - "switch": "langversion:default", - "comment": "", - "value": "default", - "flags": [] + "value": "", + "flags": [ + "UserValue", + "UserRequired" + ] }, { "name": "DelaySign", |