Commit Graph

64477 Commits

Author SHA1 Message Date
FeRD (Frank Dana)
6c3311d53b Help: Document property redefinition semantics
Add a section to the `define_property()` documentation which
details the behavior when attempting to redefine an existing
property. (The command is silently ignored.)

Provide an example using `get_property()` to examine a property
definition created with `define_property()`.
2024-01-29 05:23:37 -05:00
FeRD (Frank Dana)
7aacae4e0e Tests: Add unit tests for property redefinition
From reading `Source/cmDefinePropertyCommand.cxx` and
`Source/cmPropertyDefinition.cxx`, attempts to use `define_property()`
to redefine an existing property will be silently ignored.
Once a property is defined, it cannot be redefined.

Add some unit tests to confirm this behavior of `define_property()`
remains as expected based on the current implementation.
2024-01-29 05:23:37 -05:00
Kitware Robot
a8c09ab5f5 CMake Nightly Date Stamp 2024-01-06 00:01:08 -05:00
Brad King
1f66051983 Merge topic 'FindPkgConfig-caching'
e50aaf8547 FindPkgConfig: Update cache variables after isystem extraction
8fe6196714 FindPkgConfig: Update cache variables after framework extraction

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9109
2024-01-05 13:31:58 -05:00
Brad King
ac9fd4f009 Merge topic 'swift-always-restat'
1161ad76ac Swift/Ninja: Always restat swift build commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9076
2024-01-05 13:31:09 -05:00
Brad King
7058d715b4 Merge topic 'swift-compile-commands'
44f29a4291 Swift/Ninja: Fix multifile module compile commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9095
2024-01-05 13:30:15 -05:00
Brad King
601e16c7c5 Merge topic 'ccmake_support_preset_toolchain'
d20c21a678 ccmake: Now supports the preset toolchain entry

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !9127
2024-01-05 10:20:39 -05:00
Brad King
02eb4c0a2a Merge topic 'test-RunCMake.ExternalProject'
3253bc306e Tests: Optionally run RunCMake.ExternalProject serially

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9129
2024-01-05 10:19:51 -05:00
Brad King
2c7e01b078 Merge branch 'release-3.28' 2024-01-05 10:18:43 -05:00
Brad King
951656385d Merge topic 'doc-get-properties-inherited'
8086badba4 Help: Fix wrong return values for unset inherited properties
1ca5ec67b0 Help: Add missing DIRECTORY keyword to set_tests_properties() signature
34379f005b Help: Use <variable> consistently in property getter commands
29ccc9a4cd Help: Use <xxx> for non-keyword arguments in property command signatures

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9131
2024-01-05 10:18:42 -05:00
Brad King
47bfca8494 Merge topic 'doc-get-properties-inherited' into release-3.28
8086badba4 Help: Fix wrong return values for unset inherited properties
1ca5ec67b0 Help: Add missing DIRECTORY keyword to set_tests_properties() signature
34379f005b Help: Use <variable> consistently in property getter commands
29ccc9a4cd Help: Use <xxx> for non-keyword arguments in property command signatures

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9131
2024-01-05 10:18:41 -05:00
Brad King
6594118215 Merge branch 'release-3.28' 2024-01-05 10:16:53 -05:00
Brad King
769be838cb Merge topic 'check_language_propagate_hip_platform'
ce9c6d0994 HIP: Propagate CMAKE_HIP_PLATFORM from/to the test project in check_language
9ba3fc91e5 HIP: Really forward CMAKE_HIP_HOST_COMPILER in check_language(HIP)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9121
2024-01-05 10:16:53 -05:00
Brad King
f6f33385d7 Merge topic 'check_language_propagate_hip_platform' into release-3.28
ce9c6d0994 HIP: Propagate CMAKE_HIP_PLATFORM from/to the test project in check_language
9ba3fc91e5 HIP: Really forward CMAKE_HIP_HOST_COMPILER in check_language(HIP)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9121
2024-01-05 10:16:52 -05:00
Craig Scott
8086badba4 Help: Fix wrong return values for unset inherited properties
Since ff6234509e (Help: Clarify behavior of INHERITED properties, 2018-03-21),
the docs for some get_..._property() commands incorrectly describe
the behavior for inherited properties. When a property is not set, even
in a parent scope, the returned result from the get_..._property()
command is the same whether the property is inherited or not.
The docs incorrectly stated that an empty string would be returned
for inherited properties in such cases.
2024-01-05 17:40:16 +11:00
Craig Scott
1ca5ec67b0 Help: Add missing DIRECTORY keyword to set_tests_properties() signature 2024-01-05 16:45:27 +11:00
Kitware Robot
159872ab8b CMake Nightly Date Stamp 2024-01-05 00:01:08 -05:00
Craig Scott
34379f005b Help: Use <variable> consistently in property getter commands
Property-related commands used a mix of <VAR>, <var>, or
<variable> to specify the variable to store the result in. The <VAR>
form is particularly confusing, since being uppercase it looks more
like a keyword. Use <variable> consistently across all the commands
so that the behavior is clear.
2024-01-05 15:37:39 +11:00
Craig Scott
29ccc9a4cd Help: Use <xxx> for non-keyword arguments in property command signatures 2024-01-05 15:31:39 +11:00
Kai Pastor
e50aaf8547 FindPkgConfig: Update cache variables after isystem extraction
Fixes: #25377
2024-01-04 22:22:52 +01:00
Jeremy Day
1161ad76ac Swift/Ninja: Always restat swift build commands
The swift toolchain leaves output files untouched
if there are no meaningful input changes; without
restat, this causes ninja to needlessly rebuild
targets that are not actually out-of-date

Fixes: #25496
2024-01-04 13:20:05 -08:00
Brad King
3253bc306e Tests: Optionally run RunCMake.ExternalProject serially
On some machines running many tests concurrently, the `INACTIVITY_TIMEOUT`
cases do not always complete within their individual timeout.  Add an
undocumented cache entry to use on those machines to run the test serially.
2024-01-04 13:40:41 -05:00
Brad King
5a61984088 Merge topic 'compute-compiler-linker'
459d1cc095 Tests: Verify that linker tool is detected and identified where expected
6aec4739c1 LinkerId: Record detection steps to configure log
ba5f8dbba3 LinkerId: Use empty string for unknown linker id
6cbd0658c5 LinkerId: Match Apple linker on all Apple platforms
9324668517 LinkerId: Fix detection of GNU linker id without parenthesis in version output
37bc148870 LinkerId: Fix detection of linker tool without path
6e527c2d38 LinkerId: Fix detection of linker tool for Clang on OpenBSD
455aed3061 LinkerId: Fix detection of linker tool for MSVC
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9086
2024-01-04 11:53:38 -05:00
Brad King
d8d9b3f9e6 Merge topic 'fix_documentation'
20f74231db Help: Fix Step3 Mathfunction example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9101
2024-01-04 11:52:20 -05:00
Brad King
b0006155d3 Merge branch 'release-3.28' 2024-01-04 11:50:41 -05:00
Brad King
de73a66340 Merge branch 'release-3.27' 2024-01-04 11:50:38 -05:00
Brad King
b03e3c5251 Merge branch 'release-3.27' into release-3.28 2024-01-04 11:50:29 -05:00
Brad King
f479139ef8 Merge branch 'HELP-string_LENGTH-link-error' into release-3.27
Merge-request: !9113
2024-01-04 11:49:47 -05:00
Brad King
4bbfe2d31e Merge branch 'release-3.28' 2024-01-04 11:44:15 -05:00
Brad King
2b4bc8d469 Merge topic 'HELP-string_LENGTH-link-error'
9702a01dc9 Help: string(LENGTH): Fix synopsis link to command description

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9113
2024-01-04 11:44:14 -05:00
Brad King
f11f0f52b7 Merge topic 'HELP-string_LENGTH-link-error' into release-3.28
9702a01dc9 Help: string(LENGTH): Fix synopsis link to command description

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9113
2024-01-04 11:44:13 -05:00
Brad King
ecc064b9ad Merge branch 'release-3.28' 2024-01-04 11:35:12 -05:00
Brad King
5dd4d3d4e3 Merge topic 'revert-ExternalProject-download-byproducts'
fd3c9876c6 ExternalProject: revert `BYPRODUCTS` for download outputs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9097
2024-01-04 11:35:11 -05:00
Brad King
cab0ec1f75 Merge topic 'revert-ExternalProject-download-byproducts' into release-3.28
fd3c9876c6 ExternalProject: revert `BYPRODUCTS` for download outputs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9097
2024-01-04 11:35:10 -05:00
Gergely Meszaros
ce9c6d0994 HIP: Propagate CMAKE_HIP_PLATFORM from/to the test project in check_language
Fixes: #25541
2024-01-04 11:25:15 -05:00
Kitware Robot
31dead97ed CMake Nightly Date Stamp 2024-01-04 00:01:11 -05:00
Gergely Meszaros
9ba3fc91e5 HIP: Really forward CMAKE_HIP_HOST_COMPILER in check_language(HIP)
In commit b3e92775ab (HIP: Add CMAKE_HIP_HOST_COMPILER when compiler is
NVCC, 2023-09-25, v3.28.0-rc1~44^2~2) we accidentally left this out.
2024-01-03 18:15:21 -05:00
Evan Wilde
44f29a4291 Swift/Ninja: Fix multifile module compile commands
Swift compile commands need to have all source files in the module
specified in the compile command or LSP systems will report errors on
missing types that are defined in other source files in the same module.

Issue: #25491
2024-01-03 14:57:46 -08:00
Brad King
459d1cc095 Tests: Verify that linker tool is detected and identified where expected 2024-01-03 17:07:53 -05:00
Brad King
6aec4739c1 LinkerId: Record detection steps to configure log 2024-01-03 17:07:53 -05:00
Brad King
ba5f8dbba3 LinkerId: Use empty string for unknown linker id
Since commit c26c6ac488 (Link Step: compute effective linker used by the
compiler, 2023-05-27) we used `UNKNOWN` if the linker id is not known.
This convention is not used elsewhere, and logic using the linker id
is easier when `if(CMAKE_C_COMPILER_LINKER_ID)` is false on unknown id.
2024-01-03 17:07:52 -05:00
Brad King
6cbd0658c5 LinkerId: Match Apple linker on all Apple platforms
`cmake_determine_linker_id` is only used for macOS because Apple device
platforms set `_CMAKE_FEATURE_DETECTION_TARGET_TYPE` to `STATIC_LIBRARY`,
but we might as well prepare for them anyway.
2024-01-03 17:07:52 -05:00
Brad King
9324668517 LinkerId: Fix detection of GNU linker id without parenthesis in version output 2024-01-03 17:07:52 -05:00
Brad King
37bc148870 LinkerId: Fix detection of linker tool without path
Some compiler drivers invoke the linker tool as just `ld`, with no path,
expecting it to be in the `PATH`.
2024-01-03 17:07:52 -05:00
Brad King
6e527c2d38 LinkerId: Fix detection of linker tool for Clang on OpenBSD
Do not match quotes as part of the path.
2024-01-03 17:07:51 -05:00
Brad King
455aed3061 LinkerId: Fix detection of linker tool for MSVC
Previously we matched an entire build system output line and then
extracted the relevant portion in a separate brittle step.  Match
it directly.  Use the `CMAKE_LINKER` value directly if available.
2024-01-03 17:05:55 -05:00
Brad King
78b7ba6494 LinkerId: Fix detection of linker tool for GNU on SunOS sparc32
We do not use `-Wl,-v` on SunOS because not all GNU deployments use the
`collect2` helper, and those that do do not always print the underlying
`ld` command line.  Parse the `--with-ld=` option as a fallback.
2024-01-03 16:24:58 -05:00
Brad King
dd480e5be5 LinkerId: Fix detection of linker tool for XL compilers
These compilers print an explicit `export XL_LINKER=` line.
Parse it separately.
2024-01-03 16:24:58 -05:00
Brad King
262de2ad92 LinkerId: Fix detection of linker tool for XL as nvcc host compiler
When IBM XL is used as the host compiler for nvcc, it generates a
comma-separated link line.  Parse the `exec:` line syntax separately, as
was done in commit b5f20da94d (CMakeParseImplicitLinkInfo supports comma
separated link lines, 2019-08-23, v3.16.0-rc1~181^2).
2024-01-03 16:24:57 -05:00
Brad King
a80dca88a1 LinkerId: Prepare detection of linker tool for multiple match attempts 2024-01-03 16:24:57 -05:00