Commit Graph

37484 Commits

Author SHA1 Message Date
Brad King 80282f57a9 Merge topic 'windows-export-no-operators'
607d9cf561 WINDOWS_EXPORT_ALL_SYMBOLS: Do not export C++ operators declared extern "C"
8f8b2e9429 bindexplib: Truncate short symbol names on first embedded null-terminator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10791
2025-05-22 08:31:38 -04:00
Kitware Robot 7ffdcb1036 CMake Nightly Date Stamp 2025-05-22 00:04:25 -04:00
Brad King fc9e9d1196 Merge topic 'automoc-specific-include-dirs'
39677f4cc6 AUTOMOC: Add option to specify moc include directories explicitly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Osyotr <zhenchik35026@gmail.com>
Merge-request: !10640
2025-05-21 08:46:35 -04:00
Brad King e91b0fd0c3 Merge topic 'stdio-no-color'
6aa604ef10 StdIo: Honor NO_COLOR environment variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10805
2025-05-21 08:28:54 -04:00
Tolga Mizrak 607d9cf561 WINDOWS_EXPORT_ALL_SYMBOLS: Do not export C++ operators declared extern "C"
The pattern `extern "C" { inline bool operator==(...) {} }` appears
in at least one Windows SDK header, `winnt.h`.  Translation units that
instantiate the inline symbol produce object files with a symbol named
just `==`.  Avoid exporting such symbols because the linker will not
recognize them.

Fixes: #24999
2025-05-21 08:07:54 -04:00
Kitware Robot 4762f99954 CMake Nightly Date Stamp 2025-05-21 00:04:36 -04:00
Tolga Mizrak 8f8b2e9429 bindexplib: Truncate short symbol names on first embedded null-terminator 2025-05-20 14:19:49 -04:00
Brad King 6aa604ef10 StdIo: Honor NO_COLOR environment variable
This convention is documented by https://bixense.com/clicolors/

Closes: #26458
2025-05-20 11:57:29 -04:00
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
David Worley 39677f4cc6 AUTOMOC: Add option to specify moc include directories explicitly
Add a `AUTOMOC_INCLUDE_DIRECTORIES` target property and a corresponding
`CMAKE_AUTOMOC_INCLUDE_DIRECTORIES` variable to initialize it.
This is useful for targets that do not need moc to search include
directories from all dependencies.

Closes: #26414
2025-05-19 21:07:48 -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