Commit Graph

70657 Commits

Author SHA1 Message Date
Brad King
a61c60edae Merge branch 'upstream-KWSys' into stdio-terminal
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2025-05-20 (7e1ee2d9)
2025-05-20 08:23:20 -04:00
KWSys Upstream
bbe52677df KWSys 2025-05-20 (7e1ee2d9)
Code extracted from:

    https://gitlab.kitware.com/utils/kwsys.git

at commit 7e1ee2d997e1d8de471b8eb7acbd930db07d38ef (master).

Upstream Shortlog
-----------------

Brad King (1):
      0f8eeb90 Terminal: Remove this component of KWSys
2025-05-20 08:23:19 -04:00
Brad King
d7dbfa22a1 cmSystemTools: Drop unused MakefileColorEcho function 2025-05-19 08:19:20 -04:00
Brad King
509c424472 StdIo: Replace uses of KWSys Terminal with StdIo::Print
The latter:

* uses a type-safe representation of text attributes,

* works with `StdIo::Console` to print arbitrary UTF-8 text in color, and

* writes VT100 sequences to Windows Consoles when supported, eliminating
  racy console text attribute changes in parallel `make` output.

Fixes: #22450, #26689, #26924
2025-05-19 08:19:10 -04:00
Brad King
329d755dbd StdIo: Add a Terminal abstraction to print color text
Abstract over VT100 sequences and Windows Console text attributes.

This will replace KWSys Terminal, which does not integrate with C++
streams.

Issue: #26924
2025-05-19 08:16:56 -04:00
Brad King
03c97133e8 Makefile: De-duplicate dependency message color code 2025-05-16 15:06:24 -04:00
Brad King
2647d97ab7 cmext/enum_set: Fix static default construction on older AppleClang versions
AppleClang 8.0 and below do not understand a `= default;` constructor
in static constant default initialization, but do accept `{}`.
2025-05-16 15:03:32 -04:00
Brad King
c4b4e26019 Merge topic 'stdio-console'
ce6b0f9e10 ci: Drop unused build artifact
7cf81cdb04 Merge branch 'upstream-KWSys' into stdio-console
ad2d94cb9d KWSys 2025-05-14 (1d72955e)
40b0db5ffb cmConsoleBuf: Remove unused infrastructure
57b24e8fef StdIo: Init() automatically in Console()
3e88020aed StdIo: Replace uses of KWSys ConsoleBuf with StdIo::Console
f9f1f9a8cd StdIo: Add a Windows Console adaptor for cin, cout, and cerr

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10769
2025-05-14 10:11:23 -04:00
Brad King
ce6b0f9e10 ci: Drop unused build artifact
KWSys no longer has a `testConsoleBufChild.exe`.
2025-05-14 09:05:21 -04:00
Brad King
7cf81cdb04 Merge branch 'upstream-KWSys' into stdio-console
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2025-05-14 (1d72955e)
2025-05-14 09:05:09 -04:00
KWSys Upstream
ad2d94cb9d KWSys 2025-05-14 (1d72955e)
Code extracted from:

    https://gitlab.kitware.com/utils/kwsys.git

at commit 1d72955e085992935140f6504990f3edf3894f9e (master).

Upstream Shortlog
-----------------

Brad King (1):
      713d53a4 ConsoleBuf: Remove this component of KWSys
2025-05-14 09:05:08 -04:00
Brad King
7deaa4dfb8 Merge topic 'warn-invalid-experimental'
9036aa10f3 Experimental: provide useful warning for invalid experimental variable values
b05e5403d9 Experimental: Avoid mutating statically allocated data
348ba701fe Tests/RunCMake/cmake_language: Expect experimental warnings more precisely

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10767
2025-05-14 09:02:29 -04:00
Brad King
b226b9e21c Merge topic 'patch-FindEnvModules'
22ff5620b3 FindEnvModules: Update documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10773
2025-05-14 08:57:46 -04: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
4d2c274ab6 Merge topic 'patch-FindSubversion'
95de9682eb FindSubversion: Sync documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10771
2025-05-14 08:48:27 -04:00
Brad King
3bf632965a Merge branch 'release-4.0' 2025-05-14 08:36:47 -04:00
Brad King
25fa986f6a Merge branch 'release-3.31' 2025-05-14 08:36:40 -04:00
Brad King
668c802c22 Merge branch 'release-3.31' into release-4.0 2025-05-14 08:36:17 -04:00
Brad King
e1def70605 Merge branch 'release-4.0' 2025-05-14 08:35:24 -04:00
Brad King
0cde9c8d69 Merge topic 'cuda-13.0-prep'
b62f3257f2 CUDA/Clang: Update nvcc default architectures with CUDA 13 deprecations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !10671
2025-05-14 08:35:24 -04:00
Brad King
4137187805 Merge topic 'cuda-13.0-prep' into release-4.0
b62f3257f2 CUDA/Clang: Update nvcc default architectures with CUDA 13 deprecations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !10671
2025-05-14 08:35:22 -04:00
Brad King
e466e7d702 Merge topic 'cuda-13.0-prep' into release-3.31
b62f3257f2 CUDA/Clang: Update nvcc default architectures with CUDA 13 deprecations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10671
2025-05-14 08:33:52 -04:00
Kitware Robot
c3d20800c6 CMake Nightly Date Stamp 2025-05-14 00:04:33 -04:00
Peter Kokot
22ff5620b3 FindEnvModules: Update documentation
- Updated and synced module documentation with other similar find
  modules.
- Renamed "functions" to more general word "commands". Knowing if some
  module command is a function or a macro is from the user PoV mostly
  irrelevant and it also fits nicer with the rest of the modules.
- Reworded descriptions to make this module slightly clearer to
  understand.
- Moved examples section after commands and added example descriptions.
2025-05-13 19:05:23 +02:00
Brad King
40b0db5ffb cmConsoleBuf: Remove unused infrastructure
It has been replaced by `cm::StdIo::Console`.
2025-05-13 10:53:36 -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
Brad King
68d07edc72 Merge topic 'patch-FindPackageMessage'
50224e00cc FindPackageMessage: Refactor module introduction

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10763
2025-05-13 10:39:57 -04:00
Brad King
57b24e8fef StdIo: Init() automatically in Console()
Applications that initialize a `cm::StdIo::Console` immediately no
longer need to `cm::StdIo::Init` first.
2025-05-13 10:35:47 -04:00
Brad King
3e88020aed StdIo: Replace uses of KWSys ConsoleBuf with StdIo::Console
Issue: #26924
2025-05-13 10:35:47 -04:00
Brad King
f9f1f9a8cd StdIo: Add a Windows Console adaptor for cin, cout, and cerr
On Windows, the only reliable way to read/write Unicode text from/to a
Console is to use `ReadConsoleW` and `WriteConsoleW` and convert from/to
wide-character encoding.  When `cin`, `cout`, and/or `cerr` are attached
to a Windows Console, use a custom C++ `streambuf` to handle the I/O.

This will replace KWSys ConsoleBuf, whose implementation is more complex
to support narrow output streams on Windows non-UTF-8 narrow encodings.
We only need to support UTF-8.

Issue: #26924
2025-05-13 10:35:47 -04:00
Brad King
97c4a408ec Merge topic 'patch-CMakeDependentOption'
f70f972562 CMakeDependentOption: Sync documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10768
2025-05-13 10:32:43 -04:00
Bill Hoffman
9036aa10f3 Experimental: provide useful warning for invalid experimental variable values
Provide a useful warning if an invalid UUID is given in a
`CMAKE_EXPERIMENTAL_` variable.  This can occur if a different CMake
version is used than the one that the feature was implemented with, or
if there is a simple typo in the value.  It should reduce confusion with
the use of experimental features.

Co-authored-by: Brad King <brad.king@kitware.com>
2025-05-13 10:29:58 -04:00
Brad King
c8411d9dd0 Merge topic 'patch-CMakeAddFortranSubdirectory'
8496710537 CMakeAddFortranSubdirectory: Extend module introduction

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10764
2025-05-13 10:26:32 -04:00
Brad King
b05e5403d9 Experimental: Avoid mutating statically allocated data 2025-05-13 10:25:02 -04:00
Brad King
348ba701fe Tests/RunCMake/cmake_language: Expect experimental warnings more precisely 2025-05-13 10:21:26 -04:00
Brad King
462e119fa3 Merge topic 'patch-CMakePushCheckState'
7771f04753 CMakePushCheckState: Extend documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10761
2025-05-13 10:16:31 -04:00
Brad King
b530935bbf Merge topic 'patch-horizontal-lines'
96db6dec8b Find{BISON,FLEX}: Fix Sphinx warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10762
2025-05-13 10:08:30 -04:00
Robert Maynard
b62f3257f2 CUDA/Clang: Update nvcc default architectures with CUDA 13 deprecations
As outlined in the CUDA 12.9 release notes sm_5X, sm_6X, and sm_70
are being removed in CUDA 13:

> Maxwell, Pascal, and Volta architectures are now feature-complete with
> no further enhancements planned. While CUDA Toolkit 12.x series will
> continue to support building applications for these architectures,
> offline compilation and library support will be removed in the next
> major CUDA Toolkit version release.
2025-05-13 09:40:00 -04:00
Kitware Robot
9d41f67319 CMake Nightly Date Stamp 2025-05-13 00:04:21 -04:00
Peter Kokot
95de9682eb FindSubversion: Sync documentation
- Added intro code block with find_package() showing how to find the
  package using this module.
- Used "commands" instead of "macros".
- Synced one missed SUBVERSION_FOUND variable in code to
  Subversion_FOUND (available as of CMake 3.3.).
- Synced few descriptions with other similar find modules.
2025-05-12 23:29:21 +02: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
Brad King
4802077fb9 Merge topic 'stdio-streams'
d6a1ff59f1 StdIo: Provide metadata about stdin, stdout, stderr streams

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10759
2025-05-12 09:37:04 -04:00
Brad King
54caca4cfa Merge topic 'configure-log-find-package-v1'
e324478e9b Tests/RunCMake/find_package: test ConfigureLog behaviors (parameters)
632661795d Tests/RunCMake/find_package: test ConfigureLog behaviors (version requests)
3b01fdb761 Tests/RunCMake/find_package: test ConfigureLog behaviors (version skips)
63a90f13c2 Tests/RunCMake/find_package: test ConfigureLog behaviors (nested config)
e594ea8dfb Tests/RunCMake/find_package: test ConfigureLog behaviors (module)
48575b554b Tests/RunCMake/find_package: test ConfigureLog behaviors (config)
8df9819839 find_package: generate `find_package-v1` configure log events
20a1f26127 cmConfigureLog: support writing array values

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10737
2025-05-12 09:30:32 -04:00
Brad King
b11416a4ed Merge topic 'patch-FindDoxygen-comment'
9daa3e175d FindDoxygen: Use gerund form "Generating" instead of "Generate"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10755
2025-05-12 09:28:04 -04:00
Brad King
a1e1578e18 Merge topic 'update-kwsys'
dd162ac3be Merge branch 'upstream-KWSys' into update-kwsys
9df0cea115 KWSys 2025-05-09 (c1e5779a)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10757
2025-05-12 08:11:56 -04:00
Peter Kokot
8496710537 CMakeAddFortranSubdirectory: Extend module introduction
Changes:
- Added intro code block with include() how to load the module.
- Used "command" instead of "function".
2025-05-12 09:29:02 +02:00
Kitware Robot
31309ca2bb CMake Nightly Date Stamp 2025-05-12 00:14:28 -04:00
Peter Kokot
50224e00cc FindPackageMessage: Refactor module introduction
Changes:
- Added info how to load this module to the module introduction.
- Renamed "function" to "command" to be synced with other similar CMake
  modules.
- Restructured command description.
- Extended examples to make the two examples more related to each other.
- Simplified links to "Find Modules".
2025-05-12 01:08:25 +02:00
Brad King
d6a1ff59f1 StdIo: Provide metadata about stdin, stdout, stderr streams
Detect the kind of terminal to which they are attached, if any.

Issue: #26924
2025-05-11 09:13:16 -04:00