Commit Graph

7082 Commits

Author SHA1 Message Date
Brad King
ad4bed1679 Merge topic 'doc-CMP0124'
55bf2a3494 Help: Document CMP0124 behavior on already-set variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8850
2023-10-02 09:00:02 -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
Craig Scott
7ab880421a Merge topic 'ExternalProject-declare-download-byproducts'
872daff159 ExternalProject: declare byproducts for the download step

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8823
2023-10-01 07:12:56 -04:00
Ben Boeckel
872daff159 ExternalProject: declare byproducts for the download step
This can surface a conflict where two projects download the same file
and get scheduled against each other.
2023-09-30 15:59:22 +10:00
Brad King
55bf2a3494 Help: Document CMP0124 behavior on already-set variables
Improve the documentation from commit 46896d98bb (foreach(): loop
variables are only available in the loop scope, 2021-04-25,
v3.21.0-rc1~245^2) to follow policy documentation convention.

Fixes: #25224
Inspired-by: Marius Messerschmidt <marius.messerschmidt@googlemail.com>
2023-09-29 10:14:20 -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
2a12a83037 Merge topic 'misc-cxxmodule-fixes'
3b632f32fa Tests/CXXModules: forward the default build type
5ab6b09691 Tests/CXXModules: fix multi-config and MSVC details
11b62ef118 Tests/CXXModules: add missing `bmi-only` and compiler id fields
5d9631fbdd Tests/CXXModules: fix key set mismatch error messages
86e7fb72cb Tests/CXXModules: use a less generic name for the config
6b940dc590 Tests/CXXModules: replace the object extension as well
1c9f83c8ec Tests/CXXModules: fix error detection propagation
7a4c02cb38 cmGlobalGenerator: factor out messaging for CMP0037
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Merge-request: !8834
2023-09-27 11:22:05 -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
0be496cb5a Merge topic 'orangec-compiler'
f8fa4f1ad7 ci: Add OrangeC 6.73.1 nightly CI job
531b4fe643 OrangeC: Add support for OrangeC compiler
10f435a58f Tests: Simplify nested if conditions in Complex tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Victor <lostfreeman@gmail.com>
Merge-request: !8592
2023-09-26 09:23:10 -04:00
Craig Scott
8a90ae92af Merge topic 'FetchContent-EXCLUDE_FROM_ALL'
5f77807f1c FetchContent: Add support for EXCLUDE_FROM_ALL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8822
2023-09-26 08:35:45 -04:00
Steven Stallion
5f77807f1c FetchContent: Add support for EXCLUDE_FROM_ALL
Fixes: #20167
2023-09-26 08:56:44 +10:00
Ben Boeckel
43112cbb45 Help/CMAKE_EXPORT_COMPILE_COMMANDS: mention the output field
Added in 887a8874c3 (EXPORT_COMPILE_COMMANDS: add `output` field,
2022-10-28) via !7844. Sync the docs with this addition.
2023-09-25 17:39:35 -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
David Lindauer
531b4fe643 OrangeC: Add support for OrangeC compiler
Add compiler information modules.  Update the test suite.

Fixes: #25032
Co-authored-by: Brad King <brad.king@kitware.com>
2023-09-25 12:27:29 -04:00
scivision
449f5da373 Help:cmake(1): add versionadded back to 3.17 2023-09-24 14:41:13 -04:00
Ryan Krattiger
80838316a8 CrayClang: Add support for this compiler
Add `CrayClang` compiler ID for newer Cray compilers.

Fixes: #25102
2023-09-22 09:39:52 -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
18158bf81c HIP: Add support for NVIDIA GPUs
Add support for using the CUDA Toolkit's NVCC to compile HIP code.

Fixes: #25143
2023-09-21 15:34:37 -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
Brad King
f83790af0b Merge topic 'fileset-private-dep'
ec2ba29ac5 Ninja: Allow compilation before generation of dependencies' private sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8420
2023-09-21 09:39:56 -04:00
Brad King
6a9a738e99 Merge topic 'doc-find-arch-paths'
51c2927816 Help: Clarify requirements for find_package to use lib{64,32,x32} paths
e625255fe4 Help: Indent find_package REGISTRY_VIEW paragraphs together

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Roscoe A. Bartlett <rabartl@sandia.gov>
Merge-request: !8819
2023-09-21 08:06:16 -04:00
Brad King
51c2927816 Help: Clarify requirements for find_package to use lib{64,32,x32} paths
Issue: #25157
2023-09-20 12:44:00 -04:00
Brad King
e625255fe4 Help: Indent find_package REGISTRY_VIEW paragraphs together
In commit 8d7e80cf3d (find_* commands: add control over Windows registry
views, 2022-04-16, v3.24.0-rc1~201^2) this indentation was used for the
other find commands but was left out for `find_package`.
2023-09-20 12:31:27 -04:00
Brad King
092353eb86 Merge branch 'release-3.27' 2023-09-20 11:07:49 -04:00
Brad King
51b34a5483 CMake 3.27.6 2023-09-20 10:33:04 -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
Corentin Noël
e0d00b9218 FindPkgConfig: Allow to override variables when calling pkg_get_variable
This is specifically useful when building applications within containers as we
sometimes need to redefine the prefix used in a variable.
2023-09-19 09:08:48 +02:00
Brad King
0a81110b84 find_(library|file|path): Drop PATH-derived search prefixes
Since commit ffc06c1239 (Teach find_(library|file|path) to get prefixes
from PATH, 2015-02-18, v3.3.0-rc1~430^2) we search in `<prefix>/include`
and `<prefix>/lib` directories for prefixes with `bin` directories in
the `PATH` environment variable.  The motivation was to search the
installation prefixes of MSYS and MinGW development environments
automatically.

This behavior can search undesired prefixes that happen to be in the
`PATH` for unrelated reasons.  It was reverted for non-Windows hosts
within a year by commit b30b32a493 (Drop find_(library|file|path)
prefixes from PATH on non-Windows, 2016-05-09, v3.6.0-rc1~82^2) but was
kept on Windows hosts to support its motivating use case.  However,
similar problems have since been observed on Windows.  For example,
commit 955d6245c1 (MSVC: Revert "Teach find_library to consider the
'libfoo.a' naming convention", 2022-11-28, v3.25.1~6^2) was primarily
due to undesired discovery of libraries in `PATH`-derived prefixes.

Since commit 5e5132e1b1 (MinGW: Search for packages in standard MSYSTEM
environment prefixes, 2023-09-11) we search MSYS and MinGW environments'
prefixes explicitly, so `PATH`-derived prefixes are no longer needed for
the original motivating use case.

Fixes: #24216
2023-09-14 15:13:50 -04:00
Brad King
123cdf9816 Merge branch 'release-3.27' 2023-09-14 13:51:50 -04:00
Brad King
7d3b4868d0 CMake 3.27.5 2023-09-14 13:13:14 -04:00
Brad King
6576ca15f6 Merge topic 'mingw-search-prefixes'
5e5132e1b1 MinGW: Search for packages in standard MSYSTEM environment prefixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8796
2023-09-14 12:50:41 -04:00
Martin Duffy
634079b86d cmGeneratorExpressionEvaluator: Short-circuit boolean operators 2023-09-13 18:01:14 -04:00
Brad King
5e5132e1b1 MinGW: Search for packages in standard MSYSTEM environment prefixes
MSYS2 and similar MinGW/MSYS distributions define development
environments with a `MSYSTEM` environment variable.  Each such
environment has a documented installation prefix for its packages,
often provided by a `MSYSTEM_PREFIX` environment variable.
Since commit 84a25fc263 (cmake_host_system_information: Add
MSYSTEM_PREFIX query, 2023-09-08) we can look up this prefix.

Add `$MSYSTEM_PREFIX/local` and `$MSYSTEM_PREFIX` to our system search
prefixes when targeting MinGW under `MSYSTEM` environments.  This is
their equivalent to `/usr/local` and `/usr`, which we search by default
on UNIX systems.

Issue: #24216
2023-09-13 08:35:59 -04:00
Brad King
976659c846 Merge topic 'presets-schema'
f1a7179520 presets: Add $schema property to JSON schema
f83771dfce presets: Add missing spaces in JSON schema

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8777
2023-09-12 09:08:17 -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
Brad King
a273b7f5d4 Merge topic 'host-msystem-prefix'
84a25fc263 cmake_host_system_information: Add MSYSTEM_PREFIX query
cdcff0a0f0 cmCMakeHostSystemInformationCommand: Clarify function names and roles

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8788
2023-09-11 12:27:37 -04:00
Brad King
84a25fc263 cmake_host_system_information: Add MSYSTEM_PREFIX query
Add a query on Windows hosts for the installation prefix of a
MSYS or MinGW development environment.

Issue: #24216
2023-09-10 07:33:47 -04:00
Brad King
5924a1f0eb Help: Document if() comparison number format
Fixes: #25237
2023-09-08 10:26:34 -04:00
betsy.mcphail
a94a4c12e1 Tutorial: Fix-up typos and inconsistencies
* Fix typo in Step 2
* Fix incorrect code referenced in Step 3, TODO 7. Update comments in
MathFunctions/CMakeLists.txt to unique strings.
* Resolve inconsistencies between steps in MathFunctions/CMakeLists.txt
2023-09-07 10:57:19 -04:00
ChenMoFeiJin
f83771dfce presets: Add missing spaces in JSON schema 2023-09-07 10:00:20 -04:00
Brad King
ce4df15c41 Merge topic 'xcode-no-legacy-buildsystem'
b78a14e204 Xcode: reject legacy buildsystem for Xcode 14

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8762
2023-09-06 11:12:57 -04:00
Brad King
dfdce979e9 Merge topic 'doc-msvc-debug-format'
91dc94c4ac Help: MSVC_DEBUG_INFORMATION_FORMAT is initialized from associated variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8770
2023-09-06 10:51:40 -04:00
Brad King
91dc94c4ac Help: MSVC_DEBUG_INFORMATION_FORMAT is initialized from associated variable
The `CMAKE_MSVC_DEBUG_INFORMATION_FORMAT` variable docs mention that it
initializes the `MSVC_DEBUG_INFORMATION_FORMAT` target property, but the
property's docs was missing any mention of the variable.

Follow the pattern from commit c1b07ca9da (Help: MSVC_RUNTIME_LIBRARY is
initialized from associated variable, 2022-08-13, v3.25.0-rc1~317^2).

Fixes: #25216
2023-09-05 15:01:04 -04:00
FeRD (Frank Dana)
bbf3ed5422 Help: Explain block() policy-scope rules more clearly 2023-09-01 21:28:56 +10:00
FeRD (Frank Dana)
2f319c6484 Help: Remove "this command" ambiguity in set() docs 2023-09-01 21:28:56 +10:00