Commit Graph

3801 Commits

Author SHA1 Message Date
Ben Boeckel
02b2153d84 cmGlobalGenerator: add a query to represent support for short object names 2025-07-28 12:01:28 -04:00
Brad King
6101c162d8 Merge topic 'doc-renesas-relnote'
d95135b9cd Help: Add 4.1 release note for Renesas compiler support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10967
2025-07-24 11:25:51 -04:00
Hirofumi Nakamura
d95135b9cd Help: Add 4.1 release note for Renesas compiler support
This was missed in commit 514135f563 (Renesas: Add support for Renesas
compilers, 2025-04-14, v4.1.0-rc1~89^2).

Issue: #26880
2025-07-24 10:33:52 -04:00
Brad King
f2727c6e05 Merge topic 'ninja-per-source-job-pool'
3a9d56d2c7 Ninja: Add support for per-source JOB_POOL_COMPILE property
44bf494fe6 Help: Global SPLIT_JOBS: reformat usages into a list.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10936
2025-07-22 12:07:38 -04:00
Brad King
f8dcf102d9 Merge topic 'find-package-unwind'
f61768107e find_package: Implement UNWIND_INCLUDE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10943
2025-07-21 10:09:00 -04:00
Bastien Montagne
3a9d56d2c7 Ninja: Add support for per-source JOB_POOL_COMPILE property
This commit allows to override a global or target-wide 'job pool'
property on a per-source basis.

It modifies the Ninja generator to first look into the source's
properties, and only use the target properties as a fallback.

The new `source` parameter to
`cmNinjaTargetGenerator::addPoolNinjaVariable` may be null, e.g. when
the function is called in context where there is no source (e.g. a
linking task).

Closes: #23994
2025-07-16 21:16:24 +02:00
Brad King
1f9de0c82d Merge topic 'cmake-parent-fix'
41aea12941 Do not define CMAKE_PARENT_LIST_FILE in CMakeLists.txt

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10930
2025-07-16 11:27:00 -04:00
Benjamin Buch
41aea12941 Do not define CMAKE_PARENT_LIST_FILE in CMakeLists.txt
Add policy `CMP0198` for compatibility.

Issue: #25026
2025-07-15 11:51:45 -04:00
Vito Gamberini
f61768107e find_package: Implement UNWIND_INCLUDE
This implements a limited exception mechanism for find_package() via
the UNWIND_INCLUDE keyword.

When package discovery via find_package(UNWIND_INCLUDE) fails the
StateSnapshot is updated to an UNWINDING state. In this state further
calls to find_package() and include() are forbidden. While in the
UNWINDING state, the include() command immediately calls
SetReturnInvoked() whenever it is reached.

The UNWINDING state is reset when a parent call to find_package() is
reached.

Fixes: #26897
2025-07-13 16:08:19 -04:00
Craig Scott
4315076f2e fileapi: Add codemodelVersion fields to target and directory objects
This will allow JSON schemas for these two types of files to describe the
version-specific content without requiring any outside information.

Fixes: #27031
2025-07-13 14:59:03 +10:00
Brad King
64b35e8fcb Merge topic 'gtest-use-json-output-for-discovery'
088b0af2f9 GoogleTest: Fix naming of tests with named parameters
3f780c3fde GoogleTest: Set DEF_SOURCE_LINE on tests if file and line are known
1cdceae8e3 GoogleTest: Parse discovered test list from JSON output if supported
07d14c21a9 GoogleTest: Add tests for NO_PRETTY_VALUES and NO_PRETTY_TYPES
54bb974b27 GoogleTest: Add tests for named parameters

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Dennis Lambe <malsyned_kitware@malsyned.net>
Merge-request: !10739
2025-07-08 09:40:03 -04:00
Dennis Lambe Jr.
088b0af2f9 GoogleTest: Fix naming of tests with named parameters
Recent changes to the JSON and stdout parsers changed the current test
names from an unintentional bug to an intentional compatibility hack.
This commit removes that compatibility hack and makes tests with named
parameters follow the same naming conventions as tests with numbered
parameters.

Fixes: #26939
2025-07-08 07:58:35 +10:00
Ottmar Zittlau
3f780c3fde GoogleTest: Set DEF_SOURCE_LINE on tests if file and line are known
This information is available when --gtest_output=json is supported,
which it almost always is on GoogleTest >= 1.8.1.
2025-07-08 07:58:34 +10:00
Brad King
6ffcca0424 Merge topic 'doc-file-api-omissions'
da73f6b058 Help: Add cxxModuleBmi details missing from file API and release notes
bef17abc09 Help: Add file API fileSet... fields missed in the 3.23 release notes
094436db98 Help: The fileSets item in a codemodel target object is optional
1398ef18c2 Help: Add missing backtrace property to compileCommandFragments
74d70d13cd Help: Fix repeated word in file API docs for sourceFileExtensions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10913
2025-07-07 11:18:02 -04:00
Craig Scott
da73f6b058 Help: Add cxxModuleBmi details missing from file API and release notes
Fixes: #27028
2025-07-04 11:01:15 +10:00
Craig Scott
bef17abc09 Help: Add file API fileSet... fields missed in the 3.23 release notes 2025-07-04 10:34:33 +10:00
Brad King
b10daadd08 Deprecate Visual Studio 14 2015 generator
Update documentation to mark the generator deprecated.  Add a warning at
the end of generation plus an option to turn off the warning.
2025-06-26 09:27:24 -04:00
Brad King
f19c3b8be6 Merge topic 'COMPILER_LINKER-GenEx'
60fb5a5792 GenEx: add expressions related to linker

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10888
2025-06-20 13:48:17 -04:00
Marc Chevrier
60fb5a5792 GenEx: add expressions related to linker
Introduce the following genex:
* <LANG>_COMPILER_LINKER_ID
* <LANG>_COMPILER_LINKER_FRONTEND_VARIANT

Fixes: #26991
2025-06-19 16:11:17 +02:00
Quinn Powell
96d9b94a98 Emscripten: Add platform modules
Issue: #18423
2025-06-17 15:07:45 -04:00
Brad King
7b4a7a91eb Begin post-4.1 development 2025-06-17 10:58:36 -04:00
Brad King
29f34383f4 Help: Drop development topic notes to prepare release
Release versions do not have the development topic section of
the CMake Release Notes index page.
2025-06-17 10:54:00 -04:00
Brad King
c00896a7f5 Help: Organize and revise 4.1 release notes
Add section headers similar to the 4.0 release notes and move each
individual bullet into an appropriate section.  Revise a few bullets.
2025-06-17 09:46:48 -04:00
Brad King
f841c65b53 Help: Consolidate 4.1 release notes
Run the `Utilities/Release/consolidate-relnotes.bash` script to move
notes from `Help/release/dev/*` into `Help/release/$ver.rst`.
2025-06-17 09:39:03 -04:00
Vito Gamberini
d71b59a4f7 install(TARGETS): Don't ignore non-extant file sets
When installing FILE_SETs, it is possible the FILE_SET has not yet been
created with target_sources(FILE_SET). Instead of ignoring this
situation, we need to track the installed FILE_SET names and their
possible install destinations.

At generation time we resolve the names and destinations concretely. If
a FILE_SET wasn't provided or isn't an INTERFACE, we silently bail out.

Fixes: #26697
2025-06-12 16:58:11 -04:00
Brad King
e84aaa27af Merge branch 'release-4.0' 2025-06-12 11:02:10 -04:00
Brad King
79e82f371c CMake 4.0.3 2025-06-12 10:31:35 -04:00
Brad King
3677389eaf Merge branch 'release-3.31' 2025-06-12 10:22:49 -04:00
Brad King
7e0388220f Merge branch 'release-3.31' into release-4.0 2025-06-12 10:22:32 -04:00
Brad King
dbe9d4593f CMake 3.31.8 2025-06-12 09:51:05 -04:00
Ben Boeckel
c42d82d569 find_*: support suppressing implicit transition events
When projects explicitly unset variables, the transition detection can
end up reporting events when they are not desired.

See: #24833
2025-06-11 20:09:32 +02:00
Ben Boeckel
64f429cc4f Help/dev: add release note for implicit configure log find events 2025-06-11 20:07:34 +02:00
Brad King
00cb41c2b2 Merge branch 'release-3.30' 2025-06-11 11:56:47 -04:00
Brad King
aa221870c7 Merge branch 'release-3.31' into release-4.0 2025-06-11 11:56:25 -04:00
Brad King
a26c23a7e0 Merge branch 'release-3.30' into release-3.31 2025-06-11 11:56:14 -04:00
Brad King
50aa13cc5a CMake 3.30.9 2025-06-11 10:46:07 -04:00
Brad King
b59925a842 Merge topic 'xcode-build-workspace'
844d79916a cmake --build: Add support for driving Xcode workspaces

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10855
2025-06-11 10:26:54 -04:00
Stepanov Igor
844d79916a cmake --build: Add support for driving Xcode workspaces
External tools may create a `.xcworkspace` directory next to the
`.xcodeproj` directory that CMake generates.  If a workspace exists,
drive the build through it instead.

Closes: #26958
Co-authored-by: Brad King <brad.king@kitware.com>
2025-06-10 11:08:04 -04:00
Brad King
1824b771e9 Merge topic 'cpack-nuget-symbol-package'
e71396c8db CPack/NuGet: Enable the generation of NuGet symbol package(s)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10852
2025-06-06 08:22:00 -04:00
Brad King
91690cac34 Merge topic 'msvc-link-machine'
92d6126450 MSVC: Move link -machine flag out of CMAKE_*_LINKER_FLAGS
bb8baacbcc MSVC: Factor out link -machine flag name
4c6c7f4d45 MSVC: Move link -subsystem flag handling near and -machine flag handling
f1a80a5581 CUDA: Drop unused link rule variable setting on Windows
a0732ce47f CMAKE_STATIC_LINKER_FLAGS: Fix terminology in cache entry help string
53aab8acd6 Tests: Generalize test name RunCMake.MSVC{Warning => Default}Flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10849
2025-06-06 08:19:54 -04:00
Jens Carl
e71396c8db CPack/NuGet: Enable the generation of NuGet symbol package(s)
Enable the generation of NuGet symbol package(s) with the new variable
`CPACK_NUGET_SYMBOL_PACKAGE`. CPack generates then normal nuget package
(*.nupkg) and a symbol nuget package (*.snupkg). The new generate
package contains PDB files.

Fixes: #26976
2025-06-05 10:41:22 -04:00
Brad King
2299f09898 Merge topic 'FindCUDAToolkit-doc-links'
d8e9b1bbdf FindCUDAToolkit: Simplify internal documentation links
db9b79fb9b FindCUDAToolkit: Update documentation URLs
1049b0d9a5 FindCUDAToolkit: Fix documentation link to cuRAND section

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10859
2025-06-05 09:37:02 -04:00
Brad King
92d6126450 MSVC: Move link -machine flag out of CMAKE_*_LINKER_FLAGS
The `CMAKE_{EXE,SHARED,MODULE,STATIC}_LINKER_FLAGS` variables are
not language-specific, so multiple languages' toolchains may disagree
about if/how to pass the flag through a compiler driver to the linker.
Furthermore, carrying the flag in public-facing variables allows projects
or users to change it even though it is required.  Add policy CMP0197
to remove the flag from the public-facing variables and generate it
automatically instead:

* For command-line generators, add the `-machine:` flag to the
  linker and archiver rule variables.

* For Visual Studio generators, we do not need to explicitly add the
  link `-machine:` flag.  MSBuild automatically adds it, and the new
  behavior actually removes a duplicate we generated previously.

Issue: #21934
2025-06-05 09:16:54 -04:00
Brad King
d8e9b1bbdf FindCUDAToolkit: Simplify internal documentation links 2025-06-04 19:40:04 -04:00
Craig Scott
ab184e453f Merge topic 'patch-FindGTest'
d8b8183425 FindGTest: Deprecate result variables and update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10760
2025-06-04 16:56:31 -04:00
Peter Kokot
d8b8183425 FindGTest: Deprecate result variables and update documentation
This updates the module documentation and deprecates some result
variables in favor of using imported targets.

Changes:
- Synced module documentation with other similar find modules.
- Reworded and updated descriptions.
- Renamed "Cache Variables" to "Hints".
- Added info about config mode.
- Added separate section "Deprecated Items".
- Mention of Threads::Threads imported target removed.
2025-06-02 08:01:19 +10:00
Maximilian Sander
cdf2a36f48 HIP: Add support for [CMAKE_]HIP_LINKER_LAUNCHER
`CMAKE_<LANG>_LINKER_LAUNCHER` and `<LANG>_LINKER_LAUNCHER` are
already support for C, CXX, CUDA, OBJC, OBJCXX, and Fortran.  Add HIP.

Closes: #26967
2025-05-30 10:05:46 -04:00
Maximilian Sander
77312cc636 CUDA: Add support for [CMAKE_]CUDA_LINKER_LAUNCHER
`CMAKE_<LANG>_LINKER_LAUNCHER` and `<LANG>_LINKER_LAUNCHER` are
already support for C, CXX, OBJC, OBJCXX, and Fortran.  Add CUDA.

Issue: #26967
2025-05-30 10:00:18 -04:00
Brad King
39da33ae81 CMakeDetermineVSServicePack: Add policy to remove this module
It has been documented as deprecated since CMake 3.0.
2025-05-28 09:47:06 -04:00
Brad King
bc9785a12b Merge topic 'linker-launcher'
d176a8c5ce Fortran: Add support for [CMAKE_]Fortran_LINKER_LAUNCHER

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10831
2025-05-28 09:17:17 -04:00