Commit Graph

30993 Commits

Author SHA1 Message Date
Kitware Robot
4f69bf0964 CMake Nightly Date Stamp 2021-07-02 00:01:10 -04:00
Brad King
635a252564 Merge topic 'env-init-configs'
ef56eefc9b cmake: Allow CMAKE_CONFIGURATION_TYPES to be set by environment variable
e216b9bbd3 cmake: Allow CMAKE_BUILD_TYPE to be set by environment variable
6986a382a9 Help: Document when CMAKE_BUILD_TYPE and CMAKE_CONFIGURATION_TYPES are set
e96169a3ec Help: Cross-reference CMAKE_CONFIGURATION_TYPES from CMAKE_BUILD_TYPE
03bd9c4c10 cmMakefile: Add helper to initialize CMAKE_CONFIGURATION_TYPES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6291
2021-07-01 11:29:41 -04:00
Brad King
a10ca7f667 Merge topic 'post-rel-dev'
2c209097b9 Configure CMake itself with policies through CMake 3.20
83a3db5631 export: Increase maximum policy version in exported files to 3.20
d76cb12905 Add deprecation warnings for policies CMP0088 and below

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6290
2021-07-01 11:27:31 -04:00
Brad King
3a6cb03b6c Merge topic 'cpackdeb-md5sums-order'
a0d3494afa Tests: update MD5SUMS test to have several files
9028195a22 CPackDeb: sort package files before generating deb file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6287
2021-07-01 11:26:28 -04:00
Kitware Robot
5333ee1de4 CMake Nightly Date Stamp 2021-07-01 00:01:13 -04:00
Brad King
ef56eefc9b cmake: Allow CMAKE_CONFIGURATION_TYPES to be set by environment variable
When no `CMAKE_CONFIGURATION_TYPES` is explicitly specified while
creating a new build tree, check for an environment variable of the same
name.

Issue: #20983
2021-06-30 10:55:40 -04:00
Brad King
e216b9bbd3 cmake: Allow CMAKE_BUILD_TYPE to be set by environment variable
When no `CMAKE_BUILD_TYPE` is explicitly specified while creating a new
build tree, check for an environment variable of the same name.

Issue: #20983
2021-06-30 10:55:40 -04:00
Brad King
03bd9c4c10 cmMakefile: Add helper to initialize CMAKE_CONFIGURATION_TYPES
Factor out duplicate code from the Ninja Multi-Config, Visual Studio,
and Xcode generators.
2021-06-30 10:55:40 -04:00
Brad King
83a3db5631 export: Increase maximum policy version in exported files to 3.20
The files generatd by `install(EXPORT)` and `export()` commands
are known to work with policies as of CMake 3.20, so enable them
in sufficiently new CMake versions.
2021-06-30 10:13:56 -04:00
Brad King
d76cb12905 Add deprecation warnings for policies CMP0088 and below
The OLD behaviors of all policies are deprecated, but only by
documentation.  Add an explicit deprecation diagnostic for policies
introduced in CMake 3.14 and below to encourage projects to port
away from setting policies to OLD.
2021-06-30 10:07:42 -04:00
Alexey Rogachevskiy
9028195a22 CPackDeb: sort package files before generating deb file
This should make the order in which the files are added to md5sums
and archives is stable, thus making package files more reproducible.

Fixes: #22361
2021-06-30 08:47:59 -04:00
Brad King
6c3ae9827f Merge topic 'ninja-edit_cache'
51bf4094fb Ninja: Use `ccmake` for `edit_cache`
7cb4ad7e39 cmGlobalCommonGenerator: Adopt GetEditCacheCommand
23af78bb78 cmGlobalCommonGenerator: Adopt GetEditCacheTargetName
1db4d74628 cmGlobalCommonGenerator: Add SupportsDirectConsole
61a737b088 cmGlobalNinjaGenerator: Rename SupportsConsolePool to SupportsDirectConsole

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6272
2021-06-30 07:33:59 -04:00
Brad King
a2f2634a5d Merge topic 'CMP0126-WARNING'
616972197a Merge branch 'backport-3.21-CMP0126-WARNING' into CMP0126-WARNING
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
e052bb64ef Merge topic 'vs-ARM64EC'
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
85fe60ef03 Merge topic 'tll-out-of-dir'
e27a76f131 target_link_libraries: Restore transitive out-of-dir linking

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6285
2021-06-30 07:27:49 -04:00
Kitware Robot
82183329a5 CMake Nightly Date Stamp 2021-06-30 00:01:09 -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
NAKAMURA Takumi
51bf4094fb Ninja: Use ccmake for edit_cache
If `ninja` is new enough to support the console pool, and `ccmake` is
available, use it for `edit_cache`.
2021-06-29 11:07:42 -04:00
NAKAMURA Takumi
7cb4ad7e39 cmGlobalCommonGenerator: Adopt GetEditCacheCommand
Move the implementation from the Makefile generator so it can be
later used by the Ninja generator too.
2021-06-29 11:07:14 -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
NAKAMURA Takumi
23af78bb78 cmGlobalCommonGenerator: Adopt GetEditCacheTargetName
The implementation is the same for both Makefile and Ninja generators.
2021-06-29 10:39:15 -04:00
NAKAMURA Takumi
1db4d74628 cmGlobalCommonGenerator: Add SupportsDirectConsole
Default to `true` since this is used by Makefile generators.
The Ninja generator already overrides it to use a version check.
2021-06-29 10:37:16 -04:00
NAKAMURA Takumi
61a737b088 cmGlobalNinjaGenerator: Rename SupportsConsolePool to SupportsDirectConsole
Use a name that is not ninja-specific.
2021-06-29 10:36:03 -04:00
Brad King
5bc933ce96 Merge topic 'update-kwsys'
7e9a32947b Merge branch 'upstream-KWSys' into update-kwsys
bf4ae1c2b2 KWSys 2021-06-28 (0648cb1a)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Björn Esser <besser82@fedoraproject.org>
Merge-request: !6266
2021-06-29 09:23:28 -04:00
Marc Chevrier
616972197a Merge branch 'backport-3.21-CMP0126-WARNING' into CMP0126-WARNING 2021-06-29 13:41:10 +02:00
Marc Chevrier
16208ac113 CMP0126: Add control for warnings
Fixes: #22353
2021-06-29 13:36:28 +02:00
Kitware Robot
06d2c3fce4 CMake Nightly Date Stamp 2021-06-29 00:01:13 -04: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
c8d2e81e09 Merge topic 'target_compile_features-only-apply-to-enabled-languages'
a3cafa4237 compile_features: Ignore features that map to languages that aren't enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6255
2021-06-28 09:26:02 -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
be78a9bf68 Merge topic 'vs2022'
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
0adcdd2e00 Merge topic 'ninja-lwyu-flag-order'
d7159f9591 Ninja: Fix LINK_WHAT_YOU_USE link flag placement

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6263
2021-06-28 09:20:10 -04:00
Kitware Robot
25d7cd9671 CMake Nightly Date Stamp 2021-06-28 00:01:16 -04:00
Kitware Robot
66a0f46f9f CMake Nightly Date Stamp 2021-06-27 00:01:07 -04:00
Kitware Robot
cd809b8ea4 CMake Nightly Date Stamp 2021-06-26 00:01:09 -04:00
Robert Maynard
a3cafa4237 compile_features: Ignore features that map to languages that aren't enabled
Remove the Cuda/ConsumeCompileFeatures test as it only existed to
validate that using `cxx_std_XY` would cause the paired language (CUDA) to also build in mode XY.
2021-06-25 13:39:50 -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
a6b075c3f8 Merge topic 'import-elf'
115ff6a347 cmELF: Include the ELF parsing code unconditionally
5dfa3ddbe5 cmELF: Allow building without system ELF headers
0da1540aaa cmELF: Fix check for TagMipsRldMapRel
e21188df8b cmELF: Open file explicitly in binary mode
70cdb36d25 Merge branch 'upstream-elf' into import-elf
7a0a37ca41 elf 2021-06-23 (f13da247)
18038042ed cmelf: Add script to import the FreeBSD ELF headers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6240
2021-06-25 07:26:35 -04:00
Kitware Robot
ed295f63ec CMake Nightly Date Stamp 2021-06-25 00:01:08 -04:00
Alex Richardson
115ff6a347 cmELF: Include the ELF parsing code unconditionally
Now that the ELF definitions are provided on all platforms there is no
need to keep the CMake_USE_ELF_PARSER option.
2021-06-24 10:57:51 -04:00
Alex Richardson
5dfa3ddbe5 cmELF: Allow building without system ELF headers
Use ELF headers vendored in `Utilities/cmelf` to get the ELF constants
and types. Using the same ELF definition header for all compilation
targets allows removing some #ifdefs depending on the host OS since we
know all required ELF constants will always be present. To reduce the
size of this commit, the CMake_USE_ELF_PARSER definite will be removed
in a separate commit.

This allows me to use CMAKE_BUILD_WITH_INSTALL_RPATH=False and the Ninja
generator on macOS, whereas before it would always give me the following
error message (despite cross-compiling for an ELF-based platform):

```
The install of the <name> target requires changing an RPATH from
  the build tree, but this is not supported with the Ninja generator unless
  on an ELF-based platform.  The CMAKE_BUILD_WITH_INSTALL_RPATH variable may
  be set to avoid this relinking step.
```
2021-06-24 10:57:51 -04:00
Alex Richardson
0da1540aaa cmELF: Fix check for TagMipsRldMapRel
DT_MIPS_RLD_MAP_REL is a machine-speicific dynamic tag, so other
architectures could re-use the value of 0x70000035 to mean something
else.  Before using DT_MIPS_RLD_MAP_REL, we have to check that the ELF
file is actually has a e_machine of EM_MIPS.
2021-06-24 10:57:51 -04:00
Brad King
e21188df8b cmELF: Open file explicitly in binary mode
ELF is a binary format.
2021-06-24 10:57:51 -04:00
Brad King
004a51e0c2 Merge topic 'fortran-compiler-intrinsics'
fe3f846e1b Makefiles: Add support for building Fortran intrinsics

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5518
2021-06-24 09:12:15 -04:00
Isuru Fernando
fe3f846e1b Makefiles: Add support for building Fortran intrinsics
Fixes: #21463
2021-06-24 08:39:47 -04:00
Kitware Robot
55d9199f7c CMake Nightly Date Stamp 2021-06-24 00:01:11 -04:00
Brad King
0aae790a5e CMake 3.21.0-rc1 2021-06-23 09:01:47 -04:00
Brad King
6c5f21d10e Merge topic 'clang-compiler-warnings'
88e56c2e5a Enable compiler warnings when compiling CMake with Clang
cadf2b632e Fix -Wpessimizing-move warnings in QCMake::loadPresets()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6252
2021-06-23 08:56:28 -04:00