Commit Graph

37475 Commits

Author SHA1 Message Date
Brad King edb80c068b Merge topic 'find-package-event-providers'
3d60b0ba1d configure-log: fill in dependency provider information

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10785
2025-05-20 09:13:36 -04:00
Brad King 54e775cf22 Merge topic 'stdio-terminal'
a61c60edae Merge branch 'upstream-KWSys' into stdio-terminal
bbe52677df KWSys 2025-05-20 (7e1ee2d9)
d7dbfa22a1 cmSystemTools: Drop unused MakefileColorEcho function
509c424472 StdIo: Replace uses of KWSys Terminal with StdIo::Print
329d755dbd StdIo: Add a Terminal abstraction to print color text
03c97133e8 Makefile: De-duplicate dependency message color code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10779
2025-05-20 08:40:19 -04:00
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
Kitware Robot e0c747887e CMake Nightly Date Stamp 2025-05-20 00:04:45 -04:00
Brad King 1c40d2e6e1 Merge topic 'ctest-getdate'
458664a727 cmCTest: Avoid dependence on curl for non-network operation
d7990d20b5 cmCTest: Clarify nightly start time construction logic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10789
2025-05-19 08:45:31 -04:00
Brad King b91a376350 Merge topic 'configure-log-find-foo-fixes'
3ac505f79d cmFindCommon: log search path variables
e98381af21 cmFindBase: skip writing `names` and `*_directories` when empty

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10772
2025-05-19 08:31:17 -04:00
Brad King db4e27eb64 Merge topic 'per-target-license-info'
df3e246bc1 export: Import/export target property for license

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10424
2025-05-19 08:29:12 -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
Kitware Robot 1c1b406f35 CMake Nightly Date Stamp 2025-05-19 00:04:40 -04:00
Kitware Robot e33692e625 CMake Nightly Date Stamp 2025-05-18 00:04:31 -04:00
Kitware Robot f31923e838 CMake Nightly Date Stamp 2025-05-17 00:04:23 -04:00
Brad King 03c97133e8 Makefile: De-duplicate dependency message color code 2025-05-16 15:06:24 -04:00
Kitware Robot 18f6e2af4f CMake Nightly Date Stamp 2025-05-16 00:04:54 -04:00
Brad King 458664a727 cmCTest: Avoid dependence on curl for non-network operation
Use the date parser from libarchive instead.

Issue: #26930
2025-05-15 10:59:51 -04:00
Brad King d7990d20b5 cmCTest: Clarify nightly start time construction logic 2025-05-15 10:59:51 -04:00
Ben Boeckel 3ac505f79d cmFindCommon: log search path variables
No pruning of variables which are not relevant is performed as it would
involve duplication of determining which paths to manage.
2025-05-15 12:24:58 +02:00
Kitware Robot 5d70f07db5 CMake Nightly Date Stamp 2025-05-15 00:04:30 -04:00
Ben Boeckel 3d60b0ba1d configure-log: fill in dependency provider information
This uses the special "path" of `dependency_provider::…` to indicate the
provider in use.
2025-05-14 22:12:46 +02: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 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
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
Kitware Robot c3d20800c6 CMake Nightly Date Stamp 2025-05-14 00:04:33 -04:00
Daniel Tierney df3e246bc1 export: Import/export target property for license
Add import/export support and documentation for the SPDX_LICENSE
target property. A target's license can be specified by setting
this property to an SPDX license expression. CMake and CPS-format
export files generated with `export()` or `install()` will
retain the license information. CMake also imports the license
property for imported targets.

Closes: #26706
2025-05-13 17:01:20 -04: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 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
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 b05e5403d9 Experimental: Avoid mutating statically allocated data 2025-05-13 10:25:02 -04:00
Ben Boeckel e98381af21 cmFindBase: skip writing names and *_directories when empty
When the arrays are empty, the YAML ends up with `foo:` which is
equivalent to `foo: null`, not `foo: []`. Avoid writing the key when it
has no information to provide.
2025-05-13 14:43:08 +02:00
Kitware Robot 9d41f67319 CMake Nightly Date Stamp 2025-05-13 00:04:21 -04: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 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
Kitware Robot 31309ca2bb CMake Nightly Date Stamp 2025-05-12 00:14:28 -04: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
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
Ben Boeckel 8df9819839 find_package: generate find_package-v1 configure log events
Since `find_package` is far more complex than other `find_*` commands,
it gets its own event.

Closes: #24833
2025-05-09 16:46:43 +02:00
Ben Boeckel 20a1f26127 cmConfigureLog: support writing array values 2025-05-09 16:44:27 +02: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
Brad King dd162ac3be Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2025-05-09 (c1e5779a)
2025-05-09 08:58:22 -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
Kitware Robot 54ca95a7fc CMake Nightly Date Stamp 2025-05-08 00:04:39 -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
Kitware Robot 4cf27ab863 CMake Nightly Date Stamp 2025-05-07 00:07:49 -04: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