Commit Graph

70593 Commits

Author SHA1 Message Date
Kitware Robot 528a04ec66 CMake Nightly Date Stamp 2025-05-11 00:05:10 -04:00
Kitware Robot 6ea1f5013d CMake Nightly Date Stamp 2025-05-10 00:04:33 -04:00
Brad King 432d51a926 Merge branch 'release-4.0' 2025-05-09 09:53:20 -04:00
Brad King ec2d412052 Merge branch 'release-3.31' 2025-05-09 09:53:15 -04:00
Brad King e966e2ccbb Merge branch 'release-3.31' into release-4.0 2025-05-09 09:53:06 -04:00
Brad King 4da8a5cc93 Merge branch 'release-4.0' 2025-05-09 09:51:51 -04:00
Brad King 02ada9988e Merge topic 'backport-kwsys-SystemInformation-s390x'
b64548eedc KWSys: Backport "Fix GetNumberOfLogicalCPU on s390x" to CMake 3.31

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10758
2025-05-09 09:51:51 -04:00
Brad King 3e06fdbbb6 Merge topic 'backport-kwsys-SystemInformation-s390x' into release-4.0
b64548eedc KWSys: Backport "Fix GetNumberOfLogicalCPU on s390x" to CMake 3.31

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10758
2025-05-09 09:51:49 -04:00
Brad King 23e8090aa4 Merge topic 'backport-kwsys-SystemInformation-s390x' into release-3.31
b64548eedc KWSys: Backport "Fix GetNumberOfLogicalCPU on s390x" to CMake 3.31

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10758
2025-05-09 09:33:56 -04:00
Brad King 151a635325 Merge topic 'stdio-init'
cef4676d3a StdIo: Factor out helper to initialize stdin, stdout, and stderr

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10753
2025-05-09 09:25:01 -04:00
Tom Stellard b64548eedc KWSys: Backport "Fix GetNumberOfLogicalCPU on s390x" to CMake 3.31
The format of `/proc/cpuinfo` is different on `s390x` than other
architectures.

Issue: #26619
2025-05-09 09:14:14 -04:00
Brad King 6bc5d6d14f Merge topic 'cm-re-debugging'
fa1349267a cmredbg: add a tool to help debug `RunCMake` output matching

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10751
2025-05-09 09:07:20 -04:00
Kitware Robot 17c484d94c CMake Nightly Date Stamp 2025-05-09 00:04:31 -04:00
Brad King cef4676d3a StdIo: Factor out helper to initialize stdin, stdout, and stderr
Move logic from commit c85524a94a (Ensure stdin, stdout, and stderr pipes
are always open, 2019-05-02, v3.15.0-rc1~171^2) and commit 96010cc968
(Ensure stdin, stdout, stderr FILE streams are open on Windows, 2024-01-24,
v3.29.0-rc1~65^2) to a dedicated source.  Expose it through an `Init` class
constructor to make it optionally available during static initialization.

Issue: #26924
2025-05-08 13:39:48 -04:00
Brad King dd835c8b2b Merge topic 'FindJasper-imported-target'
ecd4e0ff16 FindJasper: Fix importing Release and Debug configurations together

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10752
2025-05-08 09:04:53 -04:00
Ben Boeckel fa1349267a cmredbg: add a tool to help debug RunCMake output matching
Finding small errors in `RunCMake` outputs against the output is a
tedious task. Add a small tool that sets up a simple `tmux` window setup
to help debug them.
2025-05-08 13:20:44 +02:00
Kitware Robot 54ca95a7fc CMake Nightly Date Stamp 2025-05-08 00:04:39 -04:00
Brad King ecd4e0ff16 FindJasper: Fix importing Release and Debug configurations together
In commit 6e8754c625 (FindJasper: Add IMPORTED target, 2021-10-06,
v3.22.0-rc1~20^2) we set `IMPORTED_LOCATION` for both.  Instead,
set `IMPORTED_LOCATION_{RELEASE,DEBUG}`.

Issue: #20601
Reported-by: Craig Scott <craig.scott@crascit.com>
2025-05-07 09:51:17 -04:00
Brad King d182ad0a90 Merge topic 'FindJasper-no-jpeg'
324ab428fa FindJasper: Do not require JPEG libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10750
2025-05-07 09:46:43 -04: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 b613318b80 Merge topic 'patch-GenerateExportHeader-module-path'
ac9585e13f GenerateExportHeader: Use CMAKE_CURRENT_FUNCTION_LIST_DIR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10749
2025-05-07 09:43:27 -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
Brad King 5d89c182fa Merge topic 'ci-linkcheck'
1b491dc4cb ci: Do not linkcheck www.gnu.org URLs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10748
2025-05-07 09:38:35 -04:00
Kitware Robot 4cf27ab863 CMake Nightly Date Stamp 2025-05-07 00:07:49 -04:00
Brad King 324ab428fa FindJasper: Do not require JPEG libraries
Jasper can be built without a dependency on JPEG.  Also, we have not
been expressing the dependency on the `Jasper::Jasper` imported target
anyway.

Fixes: #26915
2025-05-06 16:53:50 -04:00
Peter Kokot ac9585e13f GenerateExportHeader: Use CMAKE_CURRENT_FUNCTION_LIST_DIR
This replaces CMake variable _GENERATE_EXPORT_HEADER_MODULE_DIR defined
on the module inclusion and uses CMAKE_CURRENT_FUNCTION_LIST_DIR to get
the module directory, so the module can be more flexibly included in
projects not worrying about the variable scopes of where
include(GenerateExportHeader) and generate_export_header() are called.
2025-05-06 18:14:16 +02:00
Hao Dong b70ef48b27 install(DIRECTORY): Add EXCLUDE_EMPTY_DIRECTORIES option
EXCLUDE_EMPTY_DIRECTORIES option excludes empty directories under the
directory to install. A directory is considered not empty if and only if
the directory contains at least one file or one symbolic link or one
none-empty sub-directory.

Closes: #19189
2025-05-06 10:59:24 -04:00
Brad King 2a4c5923ef Merge topic 'doc-install-DIRECTORY'
0fb355143e Help: Reformat install(DIRECTORY) options as a definition list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10746
2025-05-06 09:45:06 -04:00
Brad King 015cada32d Merge topic 'patch-FindProtobuf'
1bdb0ee1b8 FindProtobuf: Deprecate protobuf_generate_*() and update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10742
2025-05-06 09:43:34 -04:00
Brad King 78f2007349 Merge topic 'no-version-2.x-changes'
af432bf582 Modules/FindTCL: Remove most "Changelog" content
29f13ef7c5 Modules/FindKDE3: Remove info on `KDE3_ENABLE_FINAL`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10744
2025-05-06 09:41:07 -04:00
Brad King ae43a0ec33 Merge topic 'implicit-link-lib-exclude'
805a40b668 Optionally exclude implicit link libraries via environment
b10a2bf63a Tests/RunCMake/ParseImplicitLinkInfo: Fix ExcludeDirs test case

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10745
2025-05-06 09:39:39 -04:00
Brad King 1b491dc4cb ci: Do not linkcheck www.gnu.org URLs
These URLs are expected to be stable.  Reduce load on GNU infrastructure.
2025-05-06 08:59:47 -04:00
Kitware Robot 6100efaa2f CMake Nightly Date Stamp 2025-05-06 00:05:39 -04:00
Peter Kokot 12ec3270c4 GenerateExportHeader: Extend documentation
- Added a quick module introduction.
- Used "commands" instead of "functions".
- Listed macro names with short descriptions.
- Described command arguments as a list separately and moved code
  examples to a dedicated section.
- Added examples section with extended examples demonstrating how to use
  this module.
- Updated the description of the deprecated add_compiler_export_flags()
  command and added example showing how to upgrade code when
  encountering it.
- Added "See Also" section with some related links.
2025-05-06 02:52:01 +02:00
Brad King 0fb355143e Help: Reformat install(DIRECTORY) options as a definition list
This makes it easier to find documentation for each option.
Previously they were sprinkled throughout prose.  It also
provides a good place for ``versionadded`` directives.
2025-05-05 15:05:33 -04:00
Brad King 805a40b668 Optionally exclude implicit link libraries via environment
CMake detects libraries that the compiler driver implicitly passes to
the linker, and stores them in `CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES`
for use in constructing mixed-language link lines.  Some compiler driver
flags add implicitly linked libraries that should not be used during
mixed-language linking because they are handled by similar flags passed
to the other language's compiler driver.  Add an environment variable
that users can set to avoid undesired implicit link libraries in such
scenarios.

Follow the pattern from commit 023de565d3 (Optionally exclude implicit
link directories via environment, 2023-05-25, v3.27.0-rc1~54^2).

Fixes: #26911
2025-05-05 12:12:44 -04:00
Brad King b10a2bf63a Tests/RunCMake/ParseImplicitLinkInfo: Fix ExcludeDirs test case
In commit 459d1cc095 (Tests: Verify that linker tool is detected and
identified where expected, 2023-12-13, v3.29.0-rc1~176^2) we renamed the
inspection result variables but did not update `ExcludeDirs`.
2025-05-05 12:12:37 -04:00
Brad King 35c86a88c1 Merge branch 'release-4.0' 2025-05-05 11:22:50 -04:00
Brad King a12ed97b5c CMake 4.0.2 v4.0.2 2025-05-05 10:23:02 -04:00
Peter Kokot 1bdb0ee1b8 FindProtobuf: Deprecate protobuf_generate_*() and update documentation
This deprecates the protobuf_generate_cpp() and protobuf_generate_python()
commands because the protobuf_generate() can work for both of these
cases and provides more options. Also, upstream Protobuf CMake-based
build system has marked these two commands as legacy and requires
setting a separate protobuf_MODULE_COMPATIBLE variable to boolean true
before calling the find_package(Protobuf).

Changes:
- Reworded and synced module documentation with other similar find
  modules.
- Imported targets moved to top.
- Moved examples to a separate section.
- Extended examples with basic usage and some quick hints how to upgrade
  deprecated commands to protobuf_generate().
- Used lowercase style of commands.
- Used "commands" instead of "functions" or "macros".
- Documented the DESCRIPTORS argument for protobuf_generate() command
  and added a note that this option is not available when Protobuf is
  found in config mode.
- Added a note about the Protobuf CMake-based build system and that
  probuf_generate*() commands might come from the upstream CMake config
  files. Mentioned also the protobuf_MODULE_COMPATIBLE variable from
  upstream CMake build system.
  See #21228.
  This fixes this issue in favor of #24321 which tracks further
  progress about Protobuf.
- Documented the missing `PROTOBUF_GENERATE_CPP_APPEND_PATH` variable.
  See #19968.

Issue: #24321
Fixes: #21228
Fixes: #19968
2025-05-05 09:33:32 -04:00
Brad King 33aa1ec831 Merge topic 'patch-FindGettext'
c13351533d FindGettext: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10735
2025-05-05 08:58:57 -04:00
Brad King 8c7ab4e1e6 Merge topic 'asm-no-msvc'
14212494bb ASM: Guard exclusion of MSVC C/CXX compiler with a policy

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10740
2025-05-05 08:55:20 -04:00
Brad King 267a1b45cf Merge branch 'release-4.0' 2025-05-05 08:52:54 -04:00
Brad King 93cbcd7596 Merge topic 'xcode-debugger-workdir'
149ee3b4bc Xcode: Use DEBUGGER_WORKING_DIRECTORY as a fallback for scheme work dir
0f1b9ef32a Help: VS_DEBUGGER_WORKING_DIRECTORY precedence

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10736
2025-05-05 08:52:54 -04:00
Brad King 3302148954 Merge topic 'xcode-debugger-workdir' into release-4.0
149ee3b4bc Xcode: Use DEBUGGER_WORKING_DIRECTORY as a fallback for scheme work dir
0f1b9ef32a Help: VS_DEBUGGER_WORKING_DIRECTORY precedence

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10736
2025-05-05 08:52:52 -04:00
FeRD (Frank Dana) af432bf582 Modules/FindTCL: Remove most "Changelog" content
Remove documentation of variables or functionality that used to be
provided prior to CMake 2.6.

Fixes: #26865
2025-05-04 10:21:42 -04:00
FeRD (Frank Dana) 29f13ef7c5 Modules/FindKDE3: Remove info on KDE3_ENABLE_FINAL
The variable was still listed as deprecated since CMake 2.4.8,
documentation, but was actually removed long ago.

Fixes: #26865
2025-05-04 10:21:42 -04:00
Kitware Robot 528ce5a96c CMake Nightly Date Stamp 2025-05-04 00:09:35 -04:00
Brad King 14212494bb ASM: Guard exclusion of MSVC C/CXX compiler with a policy
Since commit 6baf65ec46 (ASM: Do not consider MSVC C/CXX compiler for
generic ASM, 2025-04-08) we no longer mistake `cl` for an assembler.
However, some projects unconditionally enable ``ASM``, which worked
on Windows only due to that bug.  Restore compatibility with such
projects by guarding the change behind a new policy ``CMP0194``.

Fixes: #26907
Issue: #26617
2025-05-03 13:18:19 -04:00
Craig Scott 149ee3b4bc Xcode: Use DEBUGGER_WORKING_DIRECTORY as a fallback for scheme work dir
This also means when XCODE_SCHEME_WORKING_DIRECTORY is
set and a Xcode generator is used, that property will be used when
writing the debugger field in the file API replies.

Fixes: #26909
2025-05-03 10:16:15 -04:00