Commit Graph

2261 Commits

Author SHA1 Message Date
Brad King 0ff8c20932 Merge branch 'release-3.27' into release-3.28 2023-11-27 14:30:53 -05:00
Brad King a4cfa9f017 Merge branch 'release-3.26' into release-3.27 2023-11-27 14:30:37 -05:00
Brad King ceb742a8fb CMake 3.26.6 2023-11-27 13:48:12 -05:00
Brad King 1d431e440d Merge topic 'doc-ctest-link-cdash' into release-3.28
486c89dd6a Help: Fix ctest(1) manual links to www.cdash.org

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8998
2023-11-22 07:21:15 -05:00
Brad King 5c5830bb9e Merge branch 'doc-ctest-link-cdash' into release-3.27
Merge-request: !8998
2023-11-21 18:53:15 -05:00
Brad King 486c89dd6a Help: Fix ctest(1) manual links to www.cdash.org
When the link was updated to `https` by commit 52eac4573d (Help: Fix
link to cdash.org from CTest manual, 2021-04-21, v3.21.0-rc1~262^2~2)
the markup was incorrectly adjusted to show the link as part of the
"See Also" section.  It is meant to be the link destination for links
in prose elsewhere in the manual.  Fix the markup and move it to a
clearer location.  Also update the link to resolve a redirect.
2023-11-21 18:46:41 -05:00
Brad King 2f30b29ac3 Merge topic 'fileapi-file-sets-base-dirs-relative' into release-3.28
a3a85524cd fileapi: Fix file sets' base directories relative to top source

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8977
2023-11-20 09:12:59 -05:00
Brad King 3c1176bb24 Merge branch 'fileapi-file-sets-base-dirs-relative' into release-3.27
Merge-request: !8977
2023-11-20 09:12:11 -05:00
權少 c53a341f9f Help: Move deprecated properties to dedicated section 2023-11-20 08:24:51 -05:00
Kyle Edwards a3a85524cd fileapi: Fix file sets' base directories relative to top source
This field was added by commit b3e9fb67bb (file-api: support exporting
file set information, 2022-11-03, v3.26.0-rc1~389^2) but the relative
path convention used elsewhere was accidentally left out.

Fixes: #25422
2023-11-17 07:59:05 -05:00
Ben Boeckel 889aa0354a CMP0155: ignore scanning for sources if no scanner is available
This allows for a more graceful transition for projects using C++20
without scanner support (e.g., Clang 15 or GCC 13). While newer
compilers will (needlessly) scan, it allows C++20-using projects to use
older compilers without having to set `CMAKE_CXX_SCAN_FOR_MODULES` to
support newer CMake minimum versions.

Fixes: #25357
2023-11-01 09:52:08 -04:00
權少 75ca6e17f2 Help: Move some deprecated modules to the dedicated sections 2023-10-20 09:01:33 -04:00
Johel Ernesto Guerrero Peña d3978a3835 Help: Document cmake-presets version 8
This was accidentally missed in commit f1a7179520 (presets: Add $schema
property to JSON schema, 2023-09-07, v3.28.0-rc1~106^2).
2023-10-19 09:53:48 -04:00
Ben Boeckel badb6ab120 VS: Explicitly disallow C++ modules provided by imported targets
The `-ifcOnly` flag is understood by MSBuild, but there are unresolved
questions about how to integrate with with CMake's model.

See: #25328
2023-10-17 14:46:57 -04:00
Brad King 2c4f579124 Help: Fix versionadded indentation in cmake-generator-expressions(7) manual
Fix indentation of the `versionadded` markup added by commit 634079b86d
(cmGeneratorExpressionEvaluator: Short-circuit boolean operators,
2023-09-11) to render the note in the appropriate scope.
2023-10-03 10:46:13 -04:00
Brad King 8735cbba5d Merge topic 'cxxmodules-no-longer-experimental'
437280b127 cxxmodules: scan C++ sources for imports by default
3cddd11649 Ninja: message about not compiled sources explicitly
068fde1c34 cmGeneratorTarget: use `this->` for method calls
197a6bf171 cxxmodules: rework control logic for scanning regular C++ sources
5eb7bd641a Tests/RunCMake/CXXModules: remove rules file requirement
ff18acc301 CXXModules: remove `EXPERIMENTAL` from C++ module variable names
0c07f39006 cmExperimental: remove the flag for C++ modules
68caec9137 Help: add a manpage for cxxmodule support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Merge-request: !8828
2023-10-02 11:55:38 -04:00
Ben Boeckel 437280b127 cxxmodules: scan C++ sources for imports by default
Existing projects are not using C++ modules in their sources,
so introduce policy CMP0155 to enable scanning by default.
2023-10-02 10:17:31 -04:00
Ben Boeckel 197a6bf171 cxxmodules: rework control logic for scanning regular C++ sources
Now that scanning support is no longer experimental, the logic for
whether or not to scan C++ 20 sources is now important because all
projects are now exposted to the logic. Make the scanning rules explicit
in the documentation and rework the queries to localize all of the
associated logic.

A policy to handle the ultimate fallback logic will be implemented in a
following commit.
2023-10-02 10:17:31 -04:00
Ben Boeckel 68caec9137 Help: add a manpage for cxxmodule support 2023-10-02 10:17:31 -04:00
Brad King 37c80628ba Merge topic 'ctest-timeout-flag'
d267c128a2 ctest: Restore support for --timeout values higher than default test timeout
dd779a4bc2 Tests: Clarify RunCMake.CTestTimeout case name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8851
2023-10-02 08:57:36 -04:00
Brad King b3205afcde Merge topic 'help-arbitrary'
4e50320978 Help: Allow help for arbitrary keywords

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8674
2023-09-29 09:36:24 -04:00
Brad King d267c128a2 ctest: Restore support for --timeout values higher than default test timeout
Since refactoring in commit 0a5aeaf302 (cmCTestRunTest: Consolidate test
timeout selection logic, 2023-05-04, v3.27.0-rc1~120^2) we accidentally
truncate `--timeout` values to ctest's default `TimeOut`.  Fix the
logic to prefer the flag whenever the `TIMEOUT` property is not set.

In combination with the prior refactoring, this also fixes a bug that
caused `--timeout` values of 10000000 seconds or more to be ignored.

Fixes: #23979
2023-09-29 09:25:01 -04:00
Martin Duffy 4e50320978 Help: Allow help for arbitrary keywords
Changes `cmake --help [arg]` to search `Help/*/` instead of `Help/command/`
Allows editors to easily display manual for `<cword>`
2023-09-27 18:01:12 -04:00
Brad King 5d32320bf3 Merge topic 'hip-nvidia'
fd982eec10 HIP: Add tests for special NVIDIA values of CMAKE_HIP_ARCHITECTURES
8c8b3f1bfa HIP: Fix support for -DCMAKE_HIP_ARCHITECTURES=native with NVCC
b3e92775ab HIP: Add CMAKE_HIP_HOST_COMPILER when compiler is NVCC
e43918b4ca HIP: Fix linking mixed-lang binary with CXX compiler and Makefile generators
4794505122 HIP: Do not require hip-lang package for NVIDIA platform
09d759dc7f HIP: Simplify exclusion of AMD device runtime with NVIDIA GPUs
2a60663670 HIP: Simplify CMAKE_GENERATOR references for determining compiler
8124950f6c CUDA: Generalize CMAKE_{CUDA => <LANG>}_HOST_COMPILER variable docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8836
2023-09-26 09:40:25 -04:00
Brad King ccd5359003 Merge topic 'doc1'
449f5da373 Help:cmake(1): add versionadded back to 3.17

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8831
2023-09-26 09:39:20 -04:00
Brad King b8151299de Merge topic 'genexp-no-eval'
634079b86d cmGeneratorExpressionEvaluator: Short-circuit boolean operators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Merge-request: !8791
2023-09-26 09:31:42 -04:00
Brad King b3e92775ab HIP: Add CMAKE_HIP_HOST_COMPILER when compiler is NVCC
Also add `HIPHOSTCXX` environment variable.
2023-09-25 16:11:18 -04:00
Brad King 8124950f6c CUDA: Generalize CMAKE_{CUDA => <LANG>}_HOST_COMPILER variable docs 2023-09-25 16:06:30 -04:00
scivision 449f5da373 Help:cmake(1): add versionadded back to 3.17 2023-09-24 14:41:13 -04:00
Brad King 122ec98dcf Merge topic 'hip-nvidia'
6546aa2a2a ci: Add HIP job using CUDA on NVIDIA GPUs
18158bf81c HIP: Add support for NVIDIA GPUs
127b6fa06b HIP: Add CMAKE_HIP_PLATFORM variable to specify GPU platform
90e23f40ee Tests/HIP/WithDefs: Clean up test case
9ebdf3281f Tests/HIP/ArchitectureOff: Cover HIP_ARCHITECTURES initialization
cfec29196e ci: Add CUDA 11.8 to HIP 5.5 image
26470eb987 ci: Put HIP GPU platform in CMake_TEST_HIP

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8817
2023-09-22 09:19:52 -04:00
Brad King 127b6fa06b HIP: Add CMAKE_HIP_PLATFORM variable to specify GPU platform
For now, require the value to be `amd`, since that is the only
platform we currently support.
2023-09-21 15:34:37 -04:00
Martin Duffy ec2ba29ac5 Ninja: Allow compilation before generation of dependencies' private sources
This requires knowing when a generated header is public, which we can
model using file sets.  Add policy CMP0154 to treat generated sources
as private by default in targets with file sets.  Generated public
headers can be specified in public file sets.

Fixes: #24959
Issue: #15555
2023-09-20 10:25:24 -04:00
Martin Duffy 634079b86d cmGeneratorExpressionEvaluator: Short-circuit boolean operators 2023-09-13 18:01:14 -04:00
ChenMoFeiJin f1a7179520 presets: Add $schema property to JSON schema
Many modern code editors have support for JSON Schema.  When you specify
the `$schema` property in a JSON file, the editor can provide features
like auto-completion, error checking, etc., which can improve your
efficiency when writing and modifying the `CMakePresets.json` file.
2023-09-12 18:18:37 +08:00
ChenMoFeiJin f83771dfce presets: Add missing spaces in JSON schema 2023-09-07 10:00:20 -04:00
Brad King 54e376df2e Help: Update link to Qt 5 CMake docs 2023-08-22 07:24:10 -04:00
Ben Boeckel 249cd3efad cmExportFileGenerator: export private compile info for C++ modules
When consuming exported targets which contain C++ modules, the consuming
project must be able to recompile BMI files using the original target's
flags. This is because a module source may use some private target usage
requirement but not want to propagate it to consumers. To facilitate
this, export the private information as necessary for consumers to be
able to perform the BMI compilations.
2023-08-17 14:42:53 -04:00
Kyle Edwards c8c1dd0d95 CTest: Add ability to dynamically generate resource spec file
Issue: #25106
2023-08-10 16:47:51 -04:00
Craig Scott feca1d51ff Merge topic 'doc-fixups-release-3.27'
78e7ea598d cmLocalGenerator: Fix trivial spelling error in code comment
1285fe27ff Help: Improve formatting and fix wording for ENABLE_EXPORTS
91336d061c Help: Improve formatting and cross-references for DEPENDS_EXPLICIT_ONLY
03208d9e18 Help: Fix indenting within TARGET_RUNTIME_DLLS genex docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8688
2023-08-07 18:10:56 -04:00
Craig Scott 03208d9e18 Help: Fix indenting within TARGET_RUNTIME_DLLS genex docs 2023-08-04 19:16:28 +10:00
Kyle Edwards ff12a57d5e exec_program(): Remove by policy CMP0153 2023-07-25 11:09:56 -04:00
Robert Maynard 6b5f2dbbfe file(REAL_PATH): resolve symlinks before '..' components
Previously REAL_PATH would collapse paths before resolving any symlinks
so if `..` crossed a symlink the output from `REAL_PATH` would be wrong.

It looked like REAL_PATH did this by mistake since it was a side-effect
of ensuring we had an absolute path before resolving symlinks.
2023-07-20 17:02:58 -04:00
Brad King 410721477b Merge topic 'doc-list-genex'
326a73a328 Help: Improve formatting and wording of LIST generator expressions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8621
2023-07-14 08:38:04 -04:00
Craig Scott 326a73a328 Help: Improve formatting and wording of LIST generator expressions 2023-07-13 08:46:14 -04:00
Brad King 052c76d54d Merge topic 'doc-genex-TARGET_IMPORT_FILE'
69bc89758f Help: Fix typos, formatting and wording for TARGET_IMPORT_FILE genexes
9c0c844fbd Help: Add TARGET_IMPORT_FILE... genexes to 3.27 release notes
88277d15e7 Help: Add missing versionadded for TARGET_IMPORT_FILE_DIR genex

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8625
2023-07-13 08:35:17 -04:00
Craig Scott 69bc89758f Help: Fix typos, formatting and wording for TARGET_IMPORT_FILE genexes 2023-07-13 09:28:58 +10:00
Craig Scott 88277d15e7 Help: Add missing versionadded for TARGET_IMPORT_FILE_DIR genex
Issue: #25060
2023-07-13 09:16:28 +10:00
Gregor Jasny 25977e177b apple: add preliminary visionOS support 2023-07-11 20:20:25 +02:00
Matt McCormick 7005dea005 CrossCompiling: Load CMAKE_CROSSCOMPILING_EMULATOR from environment
Read `CMAKE_CROSSCOMPILING_EMULATOR` from an environment variable of the
same name if not specified with `-D` or an initial cache value.

Along with existing environment variable settings such as
`CMAKE_TOOLCHAIN_FILE`, cross compilation configuration can be more
completely set via environment variables.

Suggested-by: Henry Schreiner <henryschreineriii@gmail.com>
2023-06-13 13:58:44 -04:00
Brad King 3760ac9845 Merge topic 'file-api-query-command'
99b2ccf80d cmake_file_api: New project command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8530
2023-06-05 09:45:02 -04:00