Commit Graph

2602 Commits

Author SHA1 Message Date
Brad King
08a84180b5 Merge topic 'patch-CMAKE_CFG_INTDIR'
a180240af3 Help: Move CMAKE_CFG_INTDIR to deprecated section

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10513
2025-03-25 10:41:21 -04:00
Brad King
468ed369b4 Merge topic 'patch-FindGDAL'
9eb91c8bd3 FindGDAL: Move to list of deprecated modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10499
2025-03-25 09:40:01 -04:00
Peter Kokot
9eb91c8bd3 FindGDAL: Move to list of deprecated modules
The module was deprecated by commit 7e2aee4458 (FindGDAL: Document as
deprecated in favor of upstream CMake package, 2024-11-26,
v4.0.0-rc1~409^2).  Move the module to the list of deprecated modules.

Issue: #26471
2025-03-24 11:01:09 -04:00
Peter Kokot
a180240af3
Help: Move CMAKE_CFG_INTDIR to deprecated section 2025-03-24 00:54:18 +01:00
Brad King
97246b2083 Merge topic 'ctest-schedule-random-seed'
d3455f38de ctest: Add option to specify the --schedule-random seed
3dc8e59bdc ctest: Record --schedule-random seed in test log

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Nadav Tenenbaum <tnadav@gmail.com>
Acked-by: Hagai Cohen <hagai.co@gmail.com>
Acked-by: Toplica Tanasković <toplicius@gmail.com>
Acked-by: Itay Bookstein <itay.bookstein@nextsilicon.com>
Acked-by: Ilan Tayari <ilan@nextsilicon.com>
Acked-by: Adnan Hodzic <adnan.hodzic@nextsilicon.com>
Merge-request: !10488
2025-03-20 09:11:24 -04:00
Brad King
a28d24ce13 Merge topic 'pkgc-variable-docs'
8817f3b131 PkgC: Document cmake variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10493
2025-03-20 08:54:24 -04:00
Brad King
68475b77d2 Merge topic 'pkgc-variable-docs' into release-4.0
8817f3b131 PkgC: Document cmake variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10493
2025-03-20 08:54:21 -04:00
Brad King
deb44bdf73 Merge topic 'instrumentation-snippet-names'
39f365ec3c instrumentation: Unique snippet file names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10491
2025-03-19 09:05:56 -04:00
Vito Gamberini
8817f3b131
PkgC: Document cmake variables 2025-03-19 07:58:31 -04:00
Daniel Goldberg
d3455f38de ctest: Add option to specify the --schedule-random seed
When `--schedule-random` is used in automated CI jobs, failures may
occur due to test order.  We now log the seed.  Provide a way for
developers to re-run the same order by specifying the seed.

Fixes: #26760
Co-authored-by: Brad King <brad.king@kitware.com>
2025-03-18 14:17:59 -04:00
Martin Duffy
39f365ec3c instrumentation: Unique snippet file names
Updates the hash in snippet file naming to take the ProcessId into account
so that snippets with identical commands don't risk a collision in filename.

Additionally, this adds a `workingDir` to snippet files so that snippets with
identical commands can be more easily differentiated, such as with install
snippets.
2025-03-18 13:23:02 -04:00
Martin Duffy
40039ddbac Help: Document backtrace member of link commandFragments in FileApi manual 2025-03-14 11:18:48 -04:00
Brad King
5d510ae8a0 Merge topic 'genex-fix-target-pdb-base-name'
fe11677945 GenEx: Fix TARGET_PDB_FILE_BASE_NAME with PDB_NAME and DEBUG_POSTFIX
434c289f3b Help: Clarify references to <CONFIG>_POSTFIX target properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10431
2025-03-07 12:18:28 -05:00
Brad King
434c289f3b Help: Clarify references to <CONFIG>_POSTFIX target properties
Update wording added by commit 6e5ccabe9b (Genex: Update
$<TARGET_FILE_BASE_NAME:...>: take care of POSTFIX, 2019-04-25,
v3.15.0-rc1~175^2) to associate references to the `<CONFIG>_POSTFIX`
properties with references to the `OUTPUT_NAME` properties because
they are both used together.  Avoid association with the `PDB_NAME`
properties because they cause `<CONFIG>_POSTFIX` to be ignored.
2025-03-06 11:32:20 -05:00
Marc Chevrier
5c1521c54d FindPython: enforce artifacts consistency when cross-compiling
Fixes: #26696
2025-03-05 17:11:56 +01:00
Kitware Robot
1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05:00
Kitware Robot
de273b2e11 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 09:56:07 -05:00
Brad King
75da788360 Merge topic 'find-package-required'
857a039d66 find_*: Add variable to default calls to REQUIRED

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10364
2025-02-28 11:15:23 -05:00
Martin Duffy
857a039d66 find_*: Add variable to default calls to REQUIRED
This adds a `CMAKE_FIND_REQUIRED` variable which causes `find_package`,
`find_path`, `find_file`, `find_library` and `find_program` to be
considered `REQUIRED` by default.

It also introduces an `OPTIONAL` keyword to those commands, allowing
them to ignore the value of this variable.

Issue: #26576
2025-02-27 10:51:07 -05:00
Brad King
40ed8752ef Merge topic 'genex-transitive-link-libraries'
b3da9c6d60 GenEx: Evaluate LINK_LIBRARIES target properties transitively

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10391
2025-02-25 10:08:14 -05:00
Brad King
4af0f637c4 Merge topic 'instrumentation-quote-command'
4e7b37cad3 instrumentation: Quote command arguments to preserve separation
99cd4d979b CTest: Fix startTime in test snippets when using instrumentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10386
2025-02-25 09:38:52 -05:00
Martin Duffy
4e7b37cad3 instrumentation: Quote command arguments to preserve separation
Fixes: #26702
2025-02-24 13:11:19 -05:00
Brad King
b3da9c6d60 GenEx: Evaluate LINK_LIBRARIES target properties transitively
The `LINK_LIBRARIES` and `INTERFACE_LINK_LIBRARIES` target properties
establish the graph of link dependencies used to propagate usage
requirements transitively.  Therefore the `$<TARGET_PROPERTY:...>`
generator expression should evaluate them transitively as it does for
other transitive properties.  Add policy CMP0189 for compatibility.

Fixes: #26709
Issue: #12435
2025-02-24 11:43:47 -05:00
Brad King
f0140a6e72 Merge topic 'policy-version-env'
33856b1d62 Add CMAKE_POLICY_VERSION_MINIMUM environment variable
04721acc6c Tests: Cover CMAKE_POLICY_VERSION_MINIMUM in initial cache script
729470ff6d Tests: Cover CMAKE_POLICY_VERSION_MINIMUM in script mode
6cd10ffed7 Tests: Cover CMAKE_POLICY_VERSION_MINIMUM as cache entry

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: John Parent <john.parent@kitware.com>
Merge-request: !10376
2025-02-21 09:13:01 -05:00
Brad King
33856b1d62 Add CMAKE_POLICY_VERSION_MINIMUM environment variable
Extend commit 1a35351125 (Add CMAKE_POLICY_VERSION_MINIMUM to help
configure outdated projects, 2025-02-13, v4.0.0-rc1~12^2) with an
environment variable to initialize the cache entry.  That will make it
easier to use when `cmake` is invoked under layers of scripting.

Closes: #26715
2025-02-20 16:55:53 -05:00
Brad King
d2cda92936 Merge topic 'remove-FindGCCXML'
2123244746 FindGCCXML: Add policy to remove this module

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10359
2025-02-18 09:51:32 -05:00
Brad King
121b1f717a Merge topic 'instrumentation-presets-hooks'
45d3ffaa95 instrumentation: Use auto for variables holding closures
d75ccd9f8d instrumentation: Fix docs for ctest --collect-instrumentation option
a2232db802 instrumentation: Make hooks compatible with presets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10352
2025-02-18 09:49:47 -05:00
Brad King
2123244746 FindGCCXML: Add policy to remove this module
GCC-XML has been superseded by CastXML for a long time.

Closes: #26687
2025-02-17 11:35:25 -05:00
Martin Duffy
d75ccd9f8d instrumentation: Fix docs for ctest --collect-instrumentation option 2025-02-17 11:03:28 -05:00
Brad King
ad13d2f99a Merge topic 'source-with-and-without-extension'
321c647640 Include source file without an extension after the same name with an extension

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10271
2025-02-16 11:11:09 -05:00
Brad King
2526b01ffc Merge topic 'instrumentation_cdash'
a6d4a9a2ae ctest: Include cmake instrumentation data in XML files
85a63143ed instrument: don't report target=TARGET_NAME

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10332
2025-02-16 10:58:12 -05:00
Brad King
4300d08b20 Merge topic 'instrumentation_cdash' into release-4.0
a6d4a9a2ae ctest: Include cmake instrumentation data in XML files
85a63143ed instrument: don't report target=TARGET_NAME

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10332
2025-02-16 10:58:11 -05:00
Zack Galbreath
a6d4a9a2ae ctest: Include cmake instrumentation data in XML files 2025-02-15 06:25:12 -05:00
Zack Galbreath
85a63143ed instrument: don't report target=TARGET_NAME
Remove the erroneous default target name when instrumenting
custom commands.
2025-02-15 06:21:58 -05:00
Evan Wilde
321c647640 Include source file without an extension after the same name with an extension
CMP0115 requires that source files listed in CMake must include their
file extension, but there are cases when projects have different source
files with the same name, but one with an extension and one without.
In the current state, CMake will ignore the file without the extension
an always map it to the file with an extension.

```cmake
add_library(foo bar.c bar)
```

In the above example, the target `foo` will only recognize and depend on
`bar.c` and miss the file `bar` unless `bar` comes before `bar.c` in the
source list.
This issue also affects how custom commands emit files.

This change adds a new policy to recognize files with and without a file
extension as different files, both when building targets, and when they
are being created.

Fixes: #26058
2025-02-14 10:01:10 -05:00
Brad King
8845d33292 Merge topic 'regex'
5d039f3be3 regex: Match ^ at most once in repeated searches

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10221
2025-02-14 09:38:04 -05:00
Brad King
dce6a7aa61 Merge topic 'policy-version-var'
1a35351125 Add CMAKE_POLICY_VERSION_MINIMUM to help configure outdated projects
d723198539 Help: De-duplicate policy version documentation
e5d29e9e00 Help: Drop cmake_minimum_required pre-2.4 behavior

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10343
2025-02-14 09:32:36 -05:00
Brad King
1a35351125 Add CMAKE_POLICY_VERSION_MINIMUM to help configure outdated projects
Provide packagers and end users with a way to try configuring projects that
have not been updated to set their policy version to a supported level.

Closes: #26698
2025-02-13 14:00:26 -05:00
Nikita Nemkin
5d039f3be3 regex: Match ^ at most once in repeated searches
When doing successive matches, track the input start and current search
start positions separately to prevent the `^` anchor from matching in
the middle of the string.  Add policy CMP0186 to provide compatibility.

Issue: #26629
Fixes: #16899
2025-02-13 20:00:02 +05:00
Brad King
60bcd9cc50 Merge topic 'doc-header-only'
2d5f2c9311 Help: Make cmake-buildsystem(7) header-only examples consistent

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10333
2025-02-13 09:30:56 -05:00
Brad King
f45c1384cb Merge topic 'doc-header-only' into release-4.0
2d5f2c9311 Help: Make cmake-buildsystem(7) header-only examples consistent

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10333
2025-02-13 09:30:55 -05:00
Brad King
0492b52fd1 Merge topic 'instrumentation-build-snippet'
c8e319d08c instrumentation: Add experimental notes to docs
f777af7734 instrumentation: Update docs for available snippets
2299b2fcab instrumentation: Add build snippet

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10328
2025-02-12 09:43:19 -05:00
Patrik Huber
2d5f2c9311 Help: Make cmake-buildsystem(7) header-only examples consistent
Extend commit 93696d0f2e (Help: Restore cmake-buildsystem(7) header-only
library example, 2023-01-13, v3.25.2~3^2) to cover a second part of the
example from commit 4b25a0d512 (Help/manual: Update header-only library
example, 2022-04-22, v3.24.0-rc1~220^2).

Issue: #24319
2025-02-12 09:14:41 -05:00
Martin Duffy
c8e319d08c instrumentation: Add experimental notes to docs 2025-02-11 13:47:56 -05:00
Martin Duffy
f777af7734 instrumentation: Update docs for available snippets 2025-02-11 13:47:20 -05:00
Martin Duffy
2299b2fcab instrumentation: Add build snippet
Adds a new snippet generation for recording the full time spent waiting for
`ninja` or `make` invocations to finish.
2025-02-11 13:31:28 -05:00
Brad King
2cd962c2c4 Merge topic 'instrumentation-doc-fixes'
32e9d27c88 instrumentation: Remove undocumented binaryDir field from snippets
d88458b5ea instrumentation: Improve documentation for CMake Instrumentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10320
2025-02-11 07:46:48 -05:00
Martin Duffy
d88458b5ea instrumentation: Improve documentation for CMake Instrumentation 2025-02-10 16:57:45 -05:00
Brad King
6e337e469c Merge topic 'instrumentation-build-config'
9689155a05 instrumentation: Add Config value to snippet data
ee3a55fc48 cmMakefileGenerator: Update GetConfigName to return const reference

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10300
2025-02-10 08:25:01 -05:00
Martin Duffy
9689155a05 instrumentation: Add Config value to snippet data 2025-02-09 12:29:09 -05:00