1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00
Commit Graph

12 Commits

Author SHA1 Message Date
Brad King
b0f830ced6 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
2021-06-17 08:25:04 -04:00
Brad King
887e9df0c7 VS: Update v142 CL flag table for VS 16.10
Run the command

    python3 Source/cmConvertMSBuildXMLToJSON.py -t v142 \
        'c:/.../MSBuild/Microsoft/VC/v160/1033/cl.xml'

To generate `v142_CL.json` locally.  Manually move new and updated
settings over to `Templates/MSBuild/FlagTables/v142_CL.json`.

Revise the `/sourceDependencies[:directives]` table entries to properly
distinguish the two options (because one is a prefix of the other), and
to populate both `Generate*Dependencies` and `*DependenciesFile`.
2021-06-04 10:17:13 -04:00
Brad King
f9383e0140 VS: Re-order v141 and v142 CL flag table entries to match xml files better 2021-06-04 09:39:53 -04:00
Brad King
9054cd05e6 VS: Add flag table entries for '/external:W*' flags in VS 16.10
Fixes: #22255
2021-05-28 11:54:57 -04:00
Brad King
b11c723678 VS: Populate std:c{11,17} flag table entries for v142
The `-std:c11` option added by commit f7347f28c7 (MSVC: Record support
for C11 and c_restrict, 2020-08-09, v3.18.2~9^2) needs this flag table
entry to map in the VS IDE properly.

Issue: #21069
2020-09-28 15:51:01 -04:00
Brad King
a7973ccb53 VS: Populate /permissive flag table entry for v142
Apply the change from commit e0d6d01e52 (VS: Add flag table entry for
"permissive" flag to disable conformance mode, 2018-12-10) to the
v142 flag table.
2019-01-24 13:19:52 -05:00
Brad King
049410c0b6 VS: Populate /JMC- flag table entry for v142
Add the negative form of the option.
2019-01-24 13:19:50 -05:00
Brad King
43aa632f57 VS: Populate -Qspectre- flag table entry for v142
Rather than the change from commit 584ad067ba (VS: Fix flag table entry
for -Qspectre, 2018-11-26), update the v142 flag table with an actual
flag for the negative form of the flag.  Switch the entry order so that
the longer negative form is first.
2019-01-24 13:19:49 -05:00
Brad King
460a146e2b VS: Populate /Y- flag table entry for v142
Apply the change from commit 8df25f9400 (VS: connect /Y- compiler option
with "Not Using Precompiled Headers", 2018-11-26) to the v142 flag
table.
2019-01-24 13:19:48 -05:00
Brad King
0df3790371 VS: Add -Zc:inline[-] flag table entry for v142
Apply the change from commit f1223e34c6 (VS: Add v140 flag table entries
for `-Zc:inline[-]`, 2018-11-26) to the v142 flag table.

The documentation of this option [1] claims that the default is off, but
VS seems to use `-Zc:inline` by default if `RemoveUnreferencedCodeData`
does not appear in the `.vcxproj` file.  Add the flag table entry to
allow use of the flag to be configured.

[1] https://msdn.microsoft.com/en-us/library/dn642448.aspx
2019-01-24 13:19:47 -05:00
Brad King
fb2e418c64 VS: Fix /analyze:log flag mapping for v142
Apply the change from commit 44dc9fc48a (VS: Fix /analyze:log flag
mapping, 2018-11-26) to the v142 flag table.

The `/analyze:log` argument requires a value in the following argument.
Also drop the general `/analyze:` flag table entry so that such flags
will be passed through as plain additional options.  This is necessary
because some such options have following values and some do not but
not all have `.vcxproj` elements to hold the values.
2019-01-24 13:19:46 -05:00
Brad King
20922d6733 VS: Add v142 flag tables for cl and link tools
Convert from MSBuild `.xml` files:

    python cmConvertMSBuildXMLToJSON.py -t v142 .../2019/Preview/MSBuild/Microsoft/VC/v160/1033/cl.xml
    python cmConvertMSBuildXMLToJSON.py -t v142 .../2019/Preview/MSBuild/Microsoft/VC/v160/1033/link.xml
2019-01-24 13:19:44 -05:00