Commit Graph

3785 Commits

Author SHA1 Message Date
Brad King
ba8c4a15f1 CMake 4.1.1 2025-08-27 12:33:28 -04:00
Brad King
21e99dbf49 install(DIRECTORY): Revert "Add EXCLUDE_EMPTY_DIRECTORIES option"
Revert commit b70ef48b27 (install(DIRECTORY): Add
EXCLUDE_EMPTY_DIRECTORIES option, 2025-04-20, v4.1.0-rc1~212^2).
The implementation had at least two problems:

* It did not exclude the top-level directory if empty.
* It did not exclude non-empty directories whose contents are
  all filtered out.

Revert the feature pending a revised implementation.

Issue: #19189
Closes: #27092
2025-07-28 14:21:09 -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
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
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
Brad King
479f4f5e9a Merge topic 'patch-CheckIncludeFile'
b2e7736d81 CheckIncludeFile*: Sync documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10826
2025-05-28 08:55:44 -04:00
Maximilian Sander
d176a8c5ce Fortran: Add support for [CMAKE_]Fortran_LINKER_LAUNCHER
`CMAKE_<LANG>_LINKER_LAUNCHER` and `<LANG>_LINKER_LAUNCHER` are
already support for C, CXX, OBJC, and OBJCXX.  Add Fortran.

Closes: #26951
2025-05-27 11:00:54 -04:00
Peter Kokot
b2e7736d81 CheckIncludeFile*: Sync documentation
- Added intro code blocks showing how to include these modules.
- Used "command" instead of "macro".
- Mentioned policy CMP0075.
- Added additional example to CheckIncludeFile showing how to use
  CMAKE_REQUIRED_* variable.
2025-05-27 00:16:57 +02:00
Peter Kokot
e6f9ebbbe1 Check{,C,CXX,OBJC,OBJCXX,Fortran}SourceCompiles: Update documentation
Changes:

- Added intro code blocks showing how to include these modules.
- Added examples sections.
- Used "command" instead of "macro".
- Commands sections added to have a clearer overview of the modules at
  first encounter.
- Reworded commands arguments a bit.
- Added a rubric title for variables that affect the checks.
- CheckFortranSourceCompiles: Added CMake version when SRC_EXT option
  was introduced.
- Listed CMAKE_TRY_COMPILE_TARGET_TYPE variable in the rubric together
  with CMAKE_REQUIRED_* variables and added an include RST file for it.
- Used lowercase style for check_fortran_source_compiles().
2025-05-26 02:49:32 +02:00
Brad King
863ba7c207 Merge topic 'patch-CheckTypeSize'
1afdd98ca3 CheckTypeSize: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10808
2025-05-22 08:26:54 -04:00
Brad King
fc9e9d1196 Merge topic 'automoc-specific-include-dirs'
39677f4cc6 AUTOMOC: Add option to specify moc include directories explicitly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Osyotr <zhenchik35026@gmail.com>
Merge-request: !10640
2025-05-21 08:46:35 -04:00
Peter Kokot
1afdd98ca3 CheckTypeSize: Update documentation
- Added intro code block showing how to include this module.
- Used "command" instead of "macro".
- Described the command arguments in a list separately.
- Refactored some descriptions.
- Added a rubric title for variables that affect the check.
2025-05-20 23:35:18 +02:00
David Worley
39677f4cc6 AUTOMOC: Add option to specify moc include directories explicitly
Add a `AUTOMOC_INCLUDE_DIRECTORIES` target property and a corresponding
`CMAKE_AUTOMOC_INCLUDE_DIRECTORIES` variable to initialize it.
This is useful for targets that do not need moc to search include
directories from all dependencies.

Closes: #26414
2025-05-19 21:07:48 -04:00
Peter Kokot
c9956e777c CheckStructHasMember: Update documentation
- Added intro code block showing how to include this module.
- Used "command" instead of "macro".
- Reworded descriptions a bit.
- Extended examples section showing how to check struct members in C and
  C++. Added additional example showing how to use
  CMAKE_REQUIRED_DEFINITIONS variable.
2025-05-19 02:39:54 +02:00
Brad King
ef726f2e79 Merge topic 'patch-FindHg'
50769f3f10 FindHg: Sync module documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10770
2025-05-14 08:52:57 -04:00
Brad King
69d4fbf2e2 Merge topic 'patch-FindDoxygen'
d024ddb18a FindDoxygen: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10754
2025-05-13 10:47:18 -04:00
Peter Kokot
50769f3f10 FindHg: Sync module documentation
- Added intro code block with find_package() showing how to find the
  package with this module.
- Used "command" instead of "macro".
- Synced descriptions with other similar find modules.
2025-05-12 23:21:18 +02:00
Peter Kokot
f70f972562 CMakeDependentOption: Sync documentation
- Added intro code block with include() showing how to load this module.
- Used "command" instead of "macro".
- Removed duplicate mention of CMakeDependentOption module in the
  option() documentation.
- Synced captions in examples.
2025-05-12 21:10:29 +02:00
Peter Kokot
d024ddb18a FindDoxygen: Update documentation
- Refactored module docs sections.
- Used Doxygen_FOUND variable. The uppercased DOXYGEN_FOUND is also set
  except it has value of "YES" or "NO".
- Added separate examples section.
- Renamed "Functions" to "Commands".
- Documented doxygen_add_docs() command options as a list for better
  overview, and separated the Doxyfile configuration section as part of
  the command docs.
- Synced module docs with other similar find modules.
2025-05-11 08:38:08 +02:00
Brad King
4d51ad2b0a Merge topic 'install-DIRECTORY-exclude-empty'
b70ef48b27 install(DIRECTORY): Add EXCLUDE_EMPTY_DIRECTORIES option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10683
2025-05-07 09:45:42 -04:00
Brad King
b7a013af51 Merge topic 'patch-GenerateExportHeader'
12ec3270c4 GenerateExportHeader: Extend documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10747
2025-05-07 09:41:39 -04:00