Commit Graph

30926 Commits

Author SHA1 Message Date
Brad King
d64d2d12c3 Merge topic 'vs-utf-8' into release-3.21
9ba99a1203 VS: Add support for Utf8Enconding when using VS 16.10+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6238
2021-06-18 09:39:24 -04:00
Brad King
333e1973ce Merge topic 'vs-flag-tables' into release-3.21
b0f830ced6 VS: Do not apply any '/external:*' flag table mapping on VS < 16.10
3fd65f5ca6 VS: Compare VS instance versions as strings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6241
2021-06-18 09:38:26 -04:00
Gustavo Varo
9ba99a1203 VS: Add support for Utf8Enconding when using VS 16.10+
On VS 16.10 Preview 2 or above, generate `UseUtf8Encoding`
instead of `StdOutEncoding=UTF-8` in `.vcxproj` files.

Fixes: #22032
2021-06-17 13:44:22 -04:00
Brad King
22fb0713a2 Begin 3.21 release versioning 2021-06-17 13:17:06 -04:00
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
3fd65f5ca6 VS: Compare VS instance versions as strings
This makes the values more readable.
2021-06-17 07:54:48 -04:00
Brad King
1aa16906e6 Merge topic 'fix-flow-control-override'
c017098d4d CMake: Allow override of unexpected non-flow-control commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6232
2021-06-17 06:47:42 -04:00
Brad King
e05cf2d2de Merge topic 'vs-map-external-warnings'
ab3830401f Merge branch 'backport-3.20-vs-map-external-warnings'
e4ca525d84 VS: Do not apply '/external:W*' flag table mapping on VS < 16.10
aabc3ca47d cmGlobalVisualStudio10Generator: Adopt GetVSInstanceVersion method
e66a7fe07b cmGlobalVisualStudio10Generator: Move static functions to anonymous namespace
947f0c8b81 VS: Do not apply '/external:W*' flag table mapping on VS < 16.10
e59a208b69 cmGlobalVisualStudio10Generator: Adopt GetVSInstanceVersion method
d6d4af0ec3 cmGlobalVisualStudio10Generator: Move static functions to anonymous namespace

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6233
2021-06-17 06:45:57 -04:00
Kitware Robot
e80f56a7e5 CMake Nightly Date Stamp 2021-06-17 00:03:04 -04:00
Brad King
e4ca525d84 VS: Do not apply '/external:W*' flag table mapping on VS < 16.10
Since commit 9054cd05e6 (VS: Add flag table entries for '/external:W*'
flags in VS 16.10, 2021-05-28, v3.20.4~10^2) we map flags to the
`ExternalWarningLevel` element.  VS 16.9 does not support that element,
but its `cl` compiler does support the `/external:W*` flags.  Filter out
the flag table entry on older VS versions.

Fixes: #22308
2021-06-16 13:24:32 -04:00
Brad King
aabc3ca47d cmGlobalVisualStudio10Generator: Adopt GetVSInstanceVersion method
Port from `cmGlobalVisualStudioVersionedGenerator`.
2021-06-16 13:22:32 -04:00
Brad King
e66a7fe07b cmGlobalVisualStudio10Generator: Move static functions to anonymous namespace 2021-06-16 13:20:44 -04:00
Kyle Edwards
c017098d4d CMake: Allow override of unexpected non-flow-control commands
Fixes: #22310
2021-06-16 10:39:39 -04:00
Brad King
a9fbc4959a Merge topic 'scandep-format'
a35d121276 Ninja: Populate P1689R4 compiled-module-path field for Fortran
10b2e53469 cmScanDepFormat: Remove Fortran-specific compiled-module-path logic
2b9890e9b9 cmScanDepFormat: Avoid writing lookup-method with default value

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6228
2021-06-16 08:19:28 -04:00
Kitware Robot
24399a8d84 CMake Nightly Date Stamp 2021-06-16 00:01:09 -04:00
Brad King
a35d121276 Ninja: Populate P1689R4 compiled-module-path field for Fortran
When scanning Fortran dependencies, we know the file path at which a
provided module file is written.  Store it in the `compiled-module-path`
field as specified by P1689R4.  Our collator in `cmake_ninja_dyndep` no
longer needs to assume that the module file path can be derived from the
logical module name.  In the future, the Fortran dependency scanning may
be done by the compiler itself, in which case it will provide the value
of `compiled-module-path`.
2021-06-15 09:11:06 -04:00
Brad King
10b2e53469 cmScanDepFormat: Remove Fortran-specific compiled-module-path logic
Read and write the `compiled-module-path` field only when explicitly
known.  Move the assumption that the `compiled-module-path` can be
derived from the logical module name from the scandep parser to the
`cmake_ninja_dyndep` helper.
2021-06-15 09:09:28 -04:00
Brad King
2b9890e9b9 cmScanDepFormat: Avoid writing lookup-method with default value 2021-06-15 08:48:05 -04:00
Brad King
998fa490f4 Merge topic 'ninja-scandep-preprocessor-output'
312ced6547 cmNinjaTargetGenerator: Fix scan rule PREPROCESSED_SOURCE placeholder
1dd9c4ab6f cmNinjaTargetGenerator: Clarify GetScanBuildStatement condition
d94b23885a cmNinjaTargetGenerator: Simplify scan rule response file selection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6227
2021-06-15 08:40:29 -04:00
Kitware Robot
b302dd776c CMake Nightly Date Stamp 2021-06-15 00:01:25 -04:00
Brad King
312ced6547 cmNinjaTargetGenerator: Fix scan rule PREPROCESSED_SOURCE placeholder
When running the module dependencies scan tool for for a language that
does not compile the preprocessed output, we do not actually put the
preprocessed output in the build graph.  However, the value of
`CMAKE_EXPERIMENTAL_<LANG>_SCANDEP_SOURCE` may reference the placeholder
for the preprocessed source.  Populate the placeholder to keep the file
out of the way.  In particular, do not clobber the `.ddi` file.
2021-06-14 15:15:39 -04:00
Brad King
1dd9c4ab6f cmNinjaTargetGenerator: Clarify GetScanBuildStatement condition
Use the `compilePP` variable directly rather than relying on callers
to make `compilePP == !ppFileName.empty()`.
2021-06-14 15:11:20 -04:00
Brad King
d94b23885a cmNinjaTargetGenerator: Simplify scan rule response file selection
Since commit 33a8e0bb09 (cmNinjaTargetGenerator: Simplify scan rule
depfile selection, 2020-11-06, v3.20.0-rc1~516^2~1), the `$out` of the
scan rule always matches our `.rsp` file selection, so use `$out.rsp`.
2021-06-14 15:06:34 -04:00
Brad King
b61fe6a831 CMake 3.20.4 2021-06-14 11:05:49 -04:00
Brad King
6b218d2e26 Merge topic 'objc-std-17-23'
e8dc95ae1e ObjectiveC: Add C17 and C23 support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !6219
2021-06-14 09:49:22 -04:00
Brad King
6fa9f3c695 Merge topic 'fileapi-link-fragments'
68bbec66e0 fileapi: Fix codemodel-v2 link command fragment relative paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6220
2021-06-14 09:41:50 -04:00
Kitware Robot
6230be4975 CMake Nightly Date Stamp 2021-06-14 00:01:14 -04:00
Kitware Robot
d0ddef5812 CMake Nightly Date Stamp 2021-06-13 00:01:06 -04:00
Kitware Robot
8a4f3fd861 CMake Nightly Date Stamp 2021-06-12 00:01:11 -04:00
Brad King
68bbec66e0 fileapi: Fix codemodel-v2 link command fragment relative paths
Use the same `cmLinkLineComputer` subclass as the generator does.  This
affects the base directory from which relative paths are computed.

Fixes: #22301
2021-06-11 11:11:36 -04:00
Gregor Jasny
e8dc95ae1e ObjectiveC: Add C17 and C23 support
Issue: #22297
2021-06-11 14:47:23 +02:00
Brad King
cd2944a303 Merge topic 'p1689r4-updates'
ccc0466fc5 cmScanDepFormat: P1689R4: Implement source-path related fields
3e5b609547 cmScanDepFormat: P1689R4: Make work-directory optional
aab9a5fc3e cmScanDepFormat: P1689R4: Factor out primary-output field
b0a8fa959c cmScanDepFormat: P1689R4: Diagnose invalid provides/requires json type
82c867ad85 cmScanDepFormat: P1689R4: Flatten future-compile members into parent

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6202
2021-06-11 06:15:24 -04:00
Brad King
f597bb396e Merge topic 'dir-IMPORTED_TARGETS'
e13704ce72 Add directory property to list imported targets
ea6d338ea1 cmState: Record imported target names in each directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6215
2021-06-11 06:11:42 -04:00
Kitware Robot
42ca81ce42 CMake Nightly Date Stamp 2021-06-11 00:01:10 -04:00
Brad King
e13704ce72 Add directory property to list imported targets
Model the change after commit cbca65826c (Add directory property to list
buildsystem targets, 2016-09-19, v3.7.0-rc1~79^2~1).

Fixes: #22291
2021-06-10 15:52:12 -04:00
Brad King
ea6d338ea1 cmState: Record imported target names in each directory
Model the change after commit 089868a244 (cmState: Record buildsystem
target names in each directory, 2016-09-16, v3.7.0-rc1~79^2~3).
2021-06-10 15:41:18 -04:00
Brad King
5fd68d3ef7 Merge topic 'vs-custom-depfile'
526e2ef71c VS: Add support for add_custom_command DEPFILE
794ad78abb Help: Generalize release note filename for add_custom_command DEPFILE
7291f31254 cmTransformDepfile: Add support for MSBuild AdditionalInputs format
a6de8ec51b cmTransformDepfile: Make directory for transformed depfile automatically

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6206
2021-06-10 08:23:45 -04:00
Brad King
cf85c6bf85 Merge topic 'ctest_custom_details'
02f1271bdf ctest: allow test output to override the 'details' field

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6204
2021-06-10 08:20:18 -04:00
Ben Boeckel
ccc0466fc5 cmScanDepFormat: P1689R4: Implement source-path related fields 2021-06-10 07:55:20 -04:00
Kitware Robot
2086b938a7 CMake Nightly Date Stamp 2021-06-10 00:01:12 -04:00
Ben Boeckel
3e5b609547 cmScanDepFormat: P1689R4: Make work-directory optional 2021-06-09 11:02:25 -04:00
Ben Boeckel
aab9a5fc3e cmScanDepFormat: P1689R4: Factor out primary-output field 2021-06-09 10:51:02 -04:00
Ben Boeckel
b0a8fa959c cmScanDepFormat: P1689R4: Diagnose invalid provides/requires json type 2021-06-09 10:50:56 -04:00
Ben Boeckel
82c867ad85 cmScanDepFormat: P1689R4: Flatten future-compile members into parent 2021-06-09 10:50:41 -04:00
Brad King
526e2ef71c VS: Add support for add_custom_command DEPFILE
Transform the depfile into MSBuild `AdditionalInputs` content.  Add
MSBuild Targets to update `AdditionalInputs` and the `.tlog` files for
future builds without actually modifying the `.vcxproj` file.

Fixes: #20286
2021-06-09 10:09:58 -04:00
Brad King
7291f31254 cmTransformDepfile: Add support for MSBuild AdditionalInputs format 2021-06-09 10:09:58 -04:00
Brad King
a6de8ec51b cmTransformDepfile: Make directory for transformed depfile automatically 2021-06-09 10:09:58 -04:00
Zack Galbreath
02f1271bdf ctest: allow test output to override the 'details' field
Parse test output for <CTestDetails>...</CTestDetails>.
If found, use this value to override the default 'Details' string reported
to CDash.
2021-06-09 08:31:32 -04:00
Brad King
5c18c8a178 Merge topic 'ctest_measurement_file'
cbcb92d1cb ctest: add support for attaching files to tests at run time

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6192
2021-06-09 08:04:23 -04:00
Brad King
1d225c5c0c Merge topic 'ci-asan'
20bc209a0c gitlab-ci: add clang asan job
19d831b03d ci: add compiler-rt to Fedora base image
fda060f030 LexerParser: Do not leak Fortran parser tokens discarded due to errors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6200
2021-06-09 08:02:34 -04:00