Commit Graph

8384 Commits

Author SHA1 Message Date
Brad King
3c992e336b Merge topic 'patch-FindProtobuf-dependencies'
c375b3da9f FindProtobuf: Change protobuf_generate(DEPENDENCIES) argument to multi-value

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10733
2025-05-02 11:09:37 -04:00
Brad King
74e677f62b Merge topic 'clang-libstdcpp-support'
5750fcd7b4 ci: enable `import_std23` module compilation with clang
52e2785018 experimental/CXXModules: recycle the UUID
28333c4516 Clang/CXXImportStd: support `-stdlib=libstdc++`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10727
2025-05-01 08:40:49 -04:00
Brad King
3076dc9c5b Merge topic 'cxxmodules-gcc-15'
425ee2dd88 Help/cmake-cxxmodules: note GCC 15 support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10726
2025-05-01 08:29:06 -04:00
Peter Kokot
c375b3da9f FindProtobuf: Change protobuf_generate(DEPENDENCIES) argument to multi-value
This is a sync with the upstream `protobuf_generate()` command which has
this argument provided as a multi-value argument as of Protobuf 6.30.0
version (`cmake/protobuf-generate.cmake`).
2025-05-01 05:43:29 +02:00
Brad King
07a30dc075 Merge topic 'GNUInstallDirs-get-absolute-install-dir'
cc6dbd194c GNUInstallDirs: Cache CMAKE_INSTALL_* with leading usr/ for install prefix /
a7fcb1320c GNUInstallDirs: Make GNUInstallDirs_get_absolute_install_dir a function
03e796f9ab GNUInstallDirs: Move the common handler for `SYSCONFDIR` and `LOCALSTATEDIR`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10584
2025-04-30 09:52:43 -04:00
Brad King
cf54042a7c Merge topic 'externalproject-archive-types'
1cc85064ff ExternalProject: Remove explicit list of supported archive types
fb3757654e ExternalProject: Refactor local decompression test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10715
2025-04-30 09:51:15 -04:00
Brad King
ea9aa30551 Merge topic 'patch-FindBISON-FindFLEX'
c9d86e8beb FindFLEX: Update documentation
e0c4e8ecf4 FindBISON: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10723
2025-04-30 09:44:37 -04:00
Ben Boeckel
52e2785018 experimental/CXXModules: recycle the UUID
Now that `clang -stdlib=libstdc++` is supported.
2025-04-30 13:48:13 +02:00
Ben Boeckel
28333c4516 Clang/CXXImportStd: support -stdlib=libstdc++
Fedora 42 ships `clang` with `libstdc++` as the default. Detect and
support `import std;` in this configuration.
2025-04-30 13:47:27 +02:00
Ben Boeckel
425ee2dd88 Help/cmake-cxxmodules: note GCC 15 support 2025-04-30 13:45:39 +02:00
Cristian Le
cc6dbd194c GNUInstallDirs: Cache CMAKE_INSTALL_* with leading usr/ for install prefix /
As a consequence, `GNUInstallDirs_get_absolute_install_dir` does not
alter the `var` argument (the relative path argument).

Closes: #26834
Signed-off-by: Cristian Le <git@lecris.dev>
2025-04-29 13:49:42 -04:00
Javier Martín
1cc85064ff ExternalProject: Remove explicit list of supported archive types
- Do not try to guess the flags to pass to "cmake -E tar" ("z" or not) based
  on the extension. It is not necessary, as the archive type is autodetected
  since we switched to libarchive.
- Add new tests for .tar.zst archives, which would fail without the change.

Fixes: #25062
2025-04-29 11:22:13 -04:00
Brad King
9dcb87f87a Merge topic 'patch-FindXCTest'
72e5ebcbd3 FindXCTest: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10719
2025-04-29 11:06:04 -04:00
Brad King
2cdcf68235 Merge topic 'patch-FindMFC'
bc9faec5e5 FindMFC, CMAKE_MFC_FLAG: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10720
2025-04-29 11:04:19 -04:00
Brad King
9f4fdf10ff Merge topic 'doc-block'
9eef69bbec Help: block() command: enhance the `PROPAGATE` example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10722
2025-04-29 11:02:38 -04:00
Brad King
1dcf936f3b Merge topic 'doc-block' into release-4.0
9eef69bbec Help: block() command: enhance the `PROPAGATE` example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10722
2025-04-29 11:02:36 -04:00
Brad King
e94ace226b Merge topic 'configure-log-find-v1'
a3f273b657 cmFindBase: Create `find-v1` configure log events
58b5d41a4f cmFindBase: Track initial state with an `enum`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10621
2025-04-29 10:54:10 -04:00
Peter Kokot
c9d86e8beb FindFLEX: Update documentation
- Updated and synced module documentation with other similar find
  modules.
- Used lowercase style for commands across the docs.
- Commands documented with indentation.
- Command arguments described as a list separately.
- Used "commands" instead of "macros".
- Extended examples section.
- Added example showing how to use found Flex library by creating an
  imported target inside a project. Fixes: #18718
2025-04-29 06:33:47 +02:00
Peter Kokot
e0c4e8ecf4 FindBISON: Update documentation
- Updated and synced module documentation with other similar find
  modules.
- Documented bison_target() command indented relative to the title.
- Command arguments described as a list separately.
- Used "command" instead of "macro".
- Used lowercase style across the docs.
- Extended examples section.
2025-04-29 06:18:15 +02:00
Brad King
456cff9ebd Merge topic 'project-compat-version'
0138df29dc project: add COMPAT_VERSION keyword

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10696
2025-04-28 11:20:01 -04:00
Brad King
7c8eca5ecb Merge topic 'doc-tutorial-typo'
e07effe49c Help: Fix wording in tutorial workflow description

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10716
2025-04-28 11:18:05 -04:00
Marc Chevrier
9eef69bbec Help: block() command: enhance the PROPAGATE example
Fixes: #26902
2025-04-28 17:16:02 +02:00
Ben Boeckel
a3f273b657 cmFindBase: Create find-v1 configure log events
Record `find_` command events in the configure log, except
`find_package` as it is far more complicated (and will have its own
event kind).

Note that testing only generates the events of interest, there is no
verification. Also note that testing that the "found" to "notfound"
transition causes an event is not testable because a truthy value in the
variable skips any kind of verification or other logic beyond
normalization.

Co-Authored-by: Ryan Krattiger <ryan.krattiger@kitware.com>
See: #24833
2025-04-28 13:55:36 +02:00
Peter Kokot
bc9faec5e5 FindMFC, CMAKE_MFC_FLAG: Update documentation
FindMFC:
- Synced module documentation with other similar find modules.
- Added examples section.
- Added reference link to CMAKE_MFC_FLAG variable.

CMAKE_MFC_FLAG:
- Added separate examples section.
- Mentioned FindMFC module.
- Used target_compile_definitions() instead of add_definitions().
2025-04-28 02:36:29 +02:00
Peter Kokot
72e5ebcbd3 FindXCTest: Update documentation
- Module documentation synced with other similar find modules.
- Added examples section.
- Added note about Swift Testing framework, which supersedes the XCTest.
- Added note about the XCTEST target property and synced docs a bit.
- Used word "commands" instead of "macros" or "functions".
2025-04-28 00:12:14 +02:00
Vito Gamberini
0138df29dc project: add COMPAT_VERSION keyword
Fixes: #26893
2025-04-25 13:42:11 -04:00
Brad King
e07effe49c Help: Fix wording in tutorial workflow description 2025-04-25 11:10:10 -04:00
Brad King
2cc4c36f9f Merge topic 'patch-documentation-local-build'
4665dba9e4 Help/dev: Add info how to generate documentation locally

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10668
2025-04-18 10:33:12 -04:00
Brad King
75d9fb9b6b Merge topic 'patch-exec-program'
7b79c2b39d exec_program: Add example how to upgrade to execute_process()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10667
2025-04-18 10:30:50 -04:00
Brad King
3cc9b88eba Merge topic 'fileapi-reply-on-failure'
0cc962665b fileapi: Generate partial reply when buildsystem generation fails
09aa968ed0 cmFileAPI: Add BuildReplyEntry wrapper around AddReplyIndexObject
5e0a644ee8 Tests/RunCMake/FileAPI: Explicitly specify expected reply index prefix
0a0bd69f4b Help: Polish cmake-file-api(7) manual

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10652
2025-04-17 09:59:20 -04:00
Peter Kokot
4665dba9e4 Help/dev: Add info how to generate documentation locally
This adds a short info to the development documentation how to build it
locally quickly using only Utilities/Sphinx source directory.
2025-04-17 14:09:09 +02:00
Peter Kokot
7b79c2b39d exec_program: Add example how to upgrade to execute_process()
This hopefully helps a bit when upgrading CMake code that uses
`exec_program()` command.

Changes:
- Used third-person phrasing for the command description.
- The `exec_program()` command arguments in signature updated a bit.
- Mention of CMakeLists.txt file removed as this command also worked in
  CMake scripts and other modes.
- Added examples section.
2025-04-17 01:02:47 +02:00
Brad King
7be87256a6 Merge topic 'patch-FindSDL'
905d461431 Find_SDL*: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10657
2025-04-16 09:10:58 -04:00
Brad King
cb31aa3476 Merge topic 'doc-include-rst'
9784834b4c Help: Use `*.rst` extension for included files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10615
2025-04-15 09:42:51 -04:00
Peter Kokot
905d461431 Find_SDL*: Update documentation
This updates the following modules:
- FindSDL
- FindSDL_gfx
- FindSDL_image
- FindSDL_mixer
- FindSDL_net
- FindSDL_sound
- FindSDL_ttf

Changes:
- Synced modules documentation.
- Added examples sections.
- Used the ``<PackageName>_FOUND`` variables. The uppercased
  ``<PACKAGENAME>_FOUND`` variables are also set to the same value as of
  CMake 3.3.
- Added notes regarding the CMake package configuration files
  provided by upstream distributions with separate imported targets.
- Find modules index sorted alphabetically for FindSDL* modules.
2025-04-15 14:23:12 +02:00
Brad King
0cc962665b fileapi: Generate partial reply when buildsystem generation fails
In particular, the `configureLog` reply is useful for IDEs to read
`CMakeFiles/CMakeConfigureLog.yaml` when configuration fails.

Fixes: #26621
2025-04-14 10:42:03 -04:00
Brad King
0a0bd69f4b Help: Polish cmake-file-api(7) manual
Re-order some bullets to list the success case first.
Also remove a repeated word.
2025-04-14 09:33:38 -04:00
Brad King
ee24bb6a6f Merge topic 'cmake-parent-list-file'
a9ea55f0d7 Fix CMAKE_PARENT_LIST_FILE after return from include() or find_package()
41708398eb cmMakefile: Factor out base class for list file scope RAII
ce8be3da80 cmMakefile: De-duplicate CMAKE_CURRENT_LIST_FILE variable names
0b85f8f137 Tests: Add cases for CMAKE_PARENT_LIST_FILE with include() and find_package()
002979e145 Tests/RunCMake/include: Match incidental line numbers more robustly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10505
2025-04-14 08:29:52 -04:00
Alex Turbov
9784834b4c Help: Use *.rst extension for included files
So, editor(s) can correctly highlight the RST syntax in the included files.
2025-04-14 03:07:46 +04:00
Benjamin Buch
a9ea55f0d7 Fix CMAKE_PARENT_LIST_FILE after return from include() or find_package()
Fix the implementation, clarify the documentation, and add tests.

Fixes: #25026
Co-authored-by: Brad King <brad.king@kitware.com>
2025-04-12 09:40:37 -04:00
Brad King
dfc4beb09c Merge topic 'doc-path-case-sensitivity'
1fb7067b6e Help: Add 4.0 release note about file path case sensitivity on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10639
2025-04-11 14:37:21 -04:00
Brad King
1fb7067b6e Help: Add 4.0 release note about file path case sensitivity on Windows
Since KWSys commit `4feb470ab` (SystemTools: Remove GetActualCaseForPath
from CollapseFullPath, 2024-10-23), imported by commit ede7f2afa6 (KWSys
2024-10-24 (e1acde2e), 2024-10-24, v4.0.0-rc1~589^2~1^2), the KWSys
`CollapseFullPath` function that we use to normalize source file paths
no longer looks up the on-disk case of file paths.  This change was
intentionally made to reduce unnecessary disk accesses.  The change may
affect Windows-only projects that were never built on a case sensitive
filesystem.  Call out the change in the 4.0 release notes.

Issue: #26854
2025-04-11 10:33:09 -04:00
Brad King
028e1027be Merge branch 'release-4.0' 2025-04-10 11:32:29 -04:00
Brad King
ee515b2aa8 CMake 4.0.1 2025-04-10 10:58:22 -04:00
Brad King
03ceeac1bd Merge topic 'doc-macos-usr-local'
c69add958a Help: Add note about /usr/local/include on macOS without CMAKE_OSX_SYSROOT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10636
2025-04-10 10:54:13 -04:00
Brad King
c69add958a Help: Add note about /usr/local/include on macOS without CMAKE_OSX_SYSROOT
Issue: #19180
2025-04-10 10:16:29 -04:00
Brad King
8e4c49a4da Merge branch 'release-3.31' 2025-04-10 09:51:55 -04:00
Brad King
f098dc700e Merge branch 'release-3.31' into release-4.0 2025-04-10 09:51:27 -04:00
Brad King
7b16db932a CMake 3.31.7 2025-04-10 09:13:20 -04:00
Brad King
cc2d986fdf Merge topic 'GNUInstallDirs-special-cases'
4ed399ccfb GNUInstallDirs: Change special path defaults to absolute
7566a477f7 GNUInstallDirs: Factor out helper for special absolute path logic
42dfcbf1a5 GNUInstallDirs: Refactor LIBDIR default calculation
9789f7d05e GNUInstallDirs: Add internal helper to compute specific defaults
83f44bbf53 GNUInstallDirs: Factor out helper to compute system type
0c9b6aa9e4 GNUInstallDirs: De-duplicate description of defaults
18e1341950 GNUInstallDirs: Move defaults from arguments to variables
9f41a67fce GNUInstallDirs: Reduce duplication of CMAKE_INSTALL_ prefix
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10542
2025-04-10 08:57:49 -04:00