Commit Graph

30949 Commits

Author SHA1 Message Date
Brad King
4564c5a77e Merge topic 'cmake-presets-list-no-generator' into release-3.21
d9a3c9fad5 CMakePresets.json: Make --list-presets show presets with no generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6314
2021-07-07 09:27:45 -04:00
Brad King
19cd773c44 Merge topic 'xcode13-old-buildsystem' into release-3.21
71a2664ebb Xcode: Ignore deprecated build system

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6309
2021-07-07 09:26:35 -04:00
Kyle Edwards
d9a3c9fad5 CMakePresets.json: Make --list-presets show presets with no generator
Fixes: #22389
2021-07-06 14:36:27 -04:00
Gregor Jasny
71a2664ebb Xcode: Ignore deprecated build system
With Xcode 13 the key to suppress the check has changed.
Tested with Xcode 12.5 and 13.0-beta2.
2021-07-06 09:29:17 +02:00
Brad King
6bc6ffb9a9 Merge branch 'backport-3.20-makefile-normalize-depfile' 2021-07-02 10:01:09 -04:00
Marc Chevrier
6a6efdcaed Makefiles: Normalize compiler-generated depfile paths
Even though Makefile generators pass source files and include
directories by absolute path to the compiler, the compiler may generate
depfile paths relative to the current working directory.  For example,
`ccache` with `CCACHE_BASEDIR` may transform paths this way.  When
reading a depfile, convert relative dependencies to absolute paths
before placing them in `compiler_depend.make`, which is later evaluated
in the top-level build directory.

Fixes: #22364
2021-07-02 09:24:57 -04:00
Brad King
e610e99ad3 CMake 3.21.0-rc2 2021-06-30 07:51:35 -04:00
Brad King
825ad2fb4c Merge topic 'CMP0126-WARNING' into release-3.21
16208ac113 CMP0126: Add control for warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6282
2021-06-30 07:32:56 -04:00
Brad King
2e7ce62b73 Merge topic 'vs-ARM64EC' into release-3.21
da0f74b5a1 VS: Add ARM64EC to supported platforms for VS 16 and 17

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6283
2021-06-30 07:30:24 -04:00
Brad King
e27a76f131 target_link_libraries: Restore transitive out-of-dir linking
Refactoring in commit 7f506b95a7 (cmGeneratorTarget: Refactor link item
lookup, 2021-05-26, v3.21.0-rc1~103^2~4) accidentally dropped the
persistent lookup scope tracking across multiple items that was added by
commit f0e67da061 (target_link_libraries: Fix out-of-dir linking of a
list of targets, 2020-01-14, v3.17.0-rc1~149^2).  This broke a
transitive out-of-dir linking case not covered by our test suite.
Restore the scope tracking and add a test case.

Fixes: #22363
2021-06-29 16:52:12 -04:00
Brad King
da0f74b5a1 VS: Add ARM64EC to supported platforms for VS 16 and 17
In commit 4ea3a88625 (MSVC: Add support for targeting ARM64EC,
2020-12-30, v3.20.0-rc1~121^2) the `ARM64EC` platform was accidentally
added to the list for VS 15 (2017) instead of VS 16 (2019).  Its
omission from the list of platforms was then repeated for VS 17 (2022).

Issue: #21724
2021-06-29 10:59:05 -04:00
Marc Chevrier
16208ac113 CMP0126: Add control for warnings
Fixes: #22353
2021-06-29 13:36:28 +02:00
Brad King
7e9a32947b Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2021-06-28 (0648cb1a)
2021-06-28 13:32:23 -04:00
Brad King
117b1545a9 Merge topic 'vs2022' into release-3.21
93c718791e VS: Use 64-bit MSBuild in VS 2022
c46b265839 VS: Add Visual Studio 17 2022 generator
b610b7a35c VS: Update v142 CL flag table for VS 17.0 Preview 1
43375c6418 Help: Remove unnecessary Sphinx versionadded markup in VS toolset selection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6268
2021-06-28 09:22:38 -04:00
Brad King
93c718791e VS: Use 64-bit MSBuild in VS 2022
Visual Studio 17 2022 is now a 64-bit native application.  It places the
64-bit `MSBuild.exe` in the `PATH` of VS command prompts, so prefer it
for this version and above.

This was previously attempted for older VS versions, but reverted by
commit f3cedf381e (VS: Revert "Use MSBuild matching toolset host
architecture", 2019-03-12, v3.14.0~1^2).  For now, do not use the 64-bit
MSBuild for VS 16 and below.

Fixes: #18219
2021-06-25 12:45:53 -04:00
Brad King
c46b265839 VS: Add Visual Studio 17 2022 generator
Fixes: #22339
2021-06-25 12:45:44 -04:00
Đoàn Trần Công Danh
d7159f9591 Ninja: Fix LINK_WHAT_YOU_USE link flag placement
Move `-Wl,--no-as-needed` from the `<FLAGS>` placeholder to
`<LINK_FLAGS>`, as it is in the Makefile generators.

Fixes: #22342
2021-06-25 08:45:47 -04:00
Brad King
0aae790a5e CMake 3.21.0-rc1 2021-06-23 09:01:47 -04:00
Brad King
efa5e1f367 CMake 3.20.5 2021-06-21 11:23:19 -04:00
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
acd82e4690 Merge topic 'fix-flow-control-override' into release-3.20
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
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
Brad King
947f0c8b81 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 11:08:15 -04:00
Brad King
e59a208b69 cmGlobalVisualStudio10Generator: Adopt GetVSInstanceVersion method
Port from `cmGlobalVisualStudioVersionedGenerator`.
2021-06-16 10:57:15 -04:00
Brad King
d6d4af0ec3 cmGlobalVisualStudio10Generator: Move static functions to anonymous namespace 2021-06-16 10:57:14 -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