Commit Graph

8367 Commits

Author SHA1 Message Date
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
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
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
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
Brad King
b309159930 Merge topic 'iar-add-icstat-support'
c7d2a17253 IAR: Add support for C-STAT static analysis

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10624
2025-04-10 08:40:28 -04:00
Felipe Torrezan
c7d2a17253 IAR: Add support for C-STAT static analysis
The IAR platform offers an integrated static analysis tool named
IAR C-STAT.

Closes: #26844
2025-04-09 12:01:02 -04:00
Cristian Le
4ed399ccfb GNUInstallDirs: Change special path defaults to absolute
Add policy `CMP0192` for compatibility.

Closes: #25852
Signed-off-by: Cristian Le <git@lecris.dev>
2025-04-09 11:31:43 -04:00
Brad King
8535fd0af3 Merge topic 'doc-CMAKE_OSX_SYSROOT'
2164da0ae6 Help: Document CMAKE_OSX_SYSROOT default change in 4.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10623
2025-04-09 09:12:34 -04:00
Brad King
2164da0ae6 Help: Document CMAKE_OSX_SYSROOT default change in 4.0
In commit 7b19531291 (macOS: Do not pass any SDK/-isysroot to compilers
by default, 2024-11-06, v4.0.0-rc1~511^2) we forgot to update the
documentation of `CMAKE_OSX_SYSROOT`.

Fixes: #26846
2025-04-08 11:07:17 -04:00
Daniel Pfeifer
593a079a8f Tutorial: Cleanup CTestConfig.cmake
* Remove `CTEST_PROJECT_NAME`, as it is no longer used.
* Set `CTEST_SUBMIT_URL` instead of `CTEST_DROP_*`.
* Remove `CTEST_SUBMIT_URL`, as it is not used.
2025-04-07 20:22:54 +02:00
Brad King
b6c88c0c5d Merge topic 'patch-FindASPELL'
dd2edc3497 FindASPELL: Add components and imported targets
1056f0b166 ci: Add aspell to Debian and Fedora base images

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10543
2025-04-01 13:07:18 -04:00
Brad King
a569077b88 Merge topic 'patch-CMAKE_COMPILER_IS_GNU-docs'
7db3f983b3 CMAKE_COMPILER_IS_*: Add RST deprecation directives and update docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10550
2025-04-01 13:03:45 -04:00
Brad King
2afcbe9a81 Merge topic 'patch-cmake-developer-docs'
4af847a1cd Help: Refine the Foo_VERSION_STRING explanation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10568
2025-04-01 12:57:21 -04:00
Brad King
029415fc68 Merge topic 'unity-relative-paths'
f706d8064b Help: Clarify wording of UNITY_BUILD_RELOCATABLE path alternatives
20412690fb Help: Add 4.0 release note for UNITY_BUILD_RELOCATABLE
89cea1c642 Help: Document CMAKE_UNITY_BUILD_RELOCATABLE variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10570
2025-04-01 12:54:36 -04:00
Brad King
e3f728e4dc Merge topic 'patch-CMakeDependentOption'
67055f5b3a CMakeDependentOption: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10563
2025-04-01 11:10:04 -04:00
Peter Kokot
dd2edc3497 FindASPELL: Add components and imported targets
Components are added in a backward-compatible way:

* ASPELL component - adds the ASPELL::ASPELL imported target
* Executable component - adds the ASPELL::Executable imported target

If components are not specified in find_package() call, module, by
default, searches for both components and provides backward
compatibility with the find_package(ASPELL) usage via ASPELL_LIBRARIES,
ASPELL_INCLUDE_DIR, and ASPELL_EXECUTABLE variables.

The ASPELL_DEFINITIONS variable description removed from the
documentation as it was never defined by this module.

Additionally added a Pspell interface check (pspell.h header file) if
Aspell library provides it. It is checked separately because it might
be located in a subdirectory of pspell/pspell.h and code includes it as
`<pspell.h>`. Some distributions package pspell.h as part of the
libpspell development package and install also libaspell development
package as a dependency for BC.

Added also ASPELL_VERSION variable in case aspell executable can
determine it.

Issue: #26811
2025-04-01 05:25:25 +02:00
Brad King
f706d8064b Help: Clarify wording of UNITY_BUILD_RELOCATABLE path alternatives 2025-03-31 19:35:30 -04:00
Brad King
20412690fb Help: Add 4.0 release note for UNITY_BUILD_RELOCATABLE
This was left out of commit 84996a65aa (Unity: Add option to use
relative paths for unity files, 2024-10-15, v4.0.0-rc1~637^2).

Issue: #26352
2025-03-31 19:31:03 -04:00
Brad King
89cea1c642 Help: Document CMAKE_UNITY_BUILD_RELOCATABLE variable
In commit 84996a65aa (Unity: Add option to use relative paths for unity
files, 2024-10-15, v4.0.0-rc1~637^2) we added support for this variable
to initialize the `UNITY_BUILD_RELOCATABLE` target property, but forgot
to document it.

Issue: #26352
2025-03-31 19:31:00 -04:00
Peter Kokot
4af847a1cd Help: Refine the Foo_VERSION_STRING explanation
Changes:

- The Foo_VERSION_STRING variable is a legacy variable name and should
  be set in find modules only if the existing module is replacing some
  of its previous version. Meaning new modules/code shouldn't introduce
  such variable from scratch.
- Reworded some sentences to remove "you" making the documentation more
  neutral and less direct.
2025-04-01 00:55:59 +02:00
Brad King
908814cda0 Merge topic 'iar-help-compiler-arch-id'
775e532afb IAR: Update documentation for CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10548
2025-03-31 09:45:15 -04:00