Commit Graph

35195 Commits

Author SHA1 Message Date
Kitware Robot
98d065740e CMake Nightly Date Stamp 2024-01-27 00:01:11 -05:00
Brad King
b7c11ded92 Merge topic 'stdio-streams-always'
96010cc968 Ensure stdin, stdout, stderr FILE streams are open on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9189
2024-01-26 10:15:47 -05:00
Brad King
d9b9f63083 Merge topic 'ctest-tests-from-file'
701029726f ctest_test: add options INCLUDE_FROM_FILE and EXCLUDE_FROM_FILE
dbacc1d5a8 ctest: add command line option to exclude tests listed in a given file
022f20f663 ctest: add command line option to run the tests listed in a given file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !9128
2024-01-26 10:14:58 -05:00
Kitware Robot
60f9b0fd99 CMake Nightly Date Stamp 2024-01-26 00:01:10 -05:00
Brad King
96010cc968 Ensure stdin, stdout, stderr FILE streams are open on Windows
Extend commit c85524a94a (Ensure stdin, stdout, and stderr pipes are always
open, 2019-05-02, v3.15.0-rc1~171^2) to cover the `stdin`, `stdout`, and
`stderr` FILE streams from `<stdio.h>`.

Issue: #25625
2024-01-25 12:42:12 -05:00
Alex Neundorf
701029726f ctest_test: add options INCLUDE_FROM_FILE and EXCLUDE_FROM_FILE
These options can be used to specify files which can be used
to restrict the set of tests that will be executed.

Fixes: #25455
2024-01-25 12:38:04 -05:00
Alex Neundorf
dbacc1d5a8 ctest: add command line option to exclude tests listed in a given file
Add `--exclude-from-file <filename>` to exclude the tests listed in the
given file.

Issue: #25455
2024-01-25 12:37:56 -05:00
Alex Neundorf
022f20f663 ctest: add command line option to run the tests listed in a given file
Add `--tests-from-file <filename>` to run only the tests listed in the
given file.  The test names must match exactly, no regexps or something.
The listed tests can still be filtered with a regexp using -R.

Issue: #25455
2024-01-25 12:37:16 -05:00
Brad King
b11c8c45f9 Merge topic 'cmuvprocesschain'
adb3e13d32 cmUVProcessChain: Tolerate fileno() of invalid FILE stream
b6e4e4babc cmUVProcessChain: Simplify SetExternalStream usage
116bb2b70f cmUVProcessChain: Simplify builder initialization
d32c30906a Tests: Add missing include in testUVProcessChainHelper on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9181
2024-01-25 10:40:02 -05:00
Kitware Robot
a8f0e34790 CMake Nightly Date Stamp 2024-01-25 00:01:07 -05:00
Brad King
adb3e13d32 cmUVProcessChain: Tolerate fileno() of invalid FILE stream
On Windows, in a GUI process without a console, the `std{in,out,err}`
standard FILE streams may not be open.  Avoid passing an invalid file
descriptor to the child process, and let libuv attach NUL instead.

Fixes: #25625
2024-01-24 16:59:49 -05:00
Brad King
b6e4e4babc cmUVProcessChain: Simplify SetExternalStream usage
It is commonly called with the `fileno()` of a `FILE*` stream,
so accept the latter directly.
2024-01-24 16:59:49 -05:00
Brad King
116bb2b70f cmUVProcessChain: Simplify builder initialization 2024-01-24 16:59:49 -05:00
Brad King
73b76563fb Merge topic 'validate_read-only_target_properties'
0cfd8fe8ad cmTarget: Don't allow setting read-only properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9133
2024-01-24 08:39:09 -05:00
Kitware Robot
31cdde5ce8 CMake Nightly Date Stamp 2024-01-24 00:01:18 -05:00
Robert Maynard
0cfd8fe8ad cmTarget: Don't allow setting read-only properties
Ensure that all documented read-only target properties now produce
errors when trying to set.
2024-01-23 08:50:38 -05:00
Kitware Robot
77dc558d1e CMake Nightly Date Stamp 2024-01-23 00:01:12 -05:00
Kitware Robot
71d1322d27 CMake Nightly Date Stamp 2024-01-22 00:01:18 -05:00
Kitware Robot
492d90380e CMake Nightly Date Stamp 2024-01-21 00:01:06 -05:00
Kitware Robot
c0247376c6 CMake Nightly Date Stamp 2024-01-20 00:01:07 -05:00
Brad King
af076796c3 Merge topic 'cuda-clang-no-link-arch'
45d53bdb70 CUDA/Clang: Do not pass explicit architecture flags when linking

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !9165
2024-01-19 11:40:38 -05:00
Brad King
0102b25cf8 Merge topic 'cxxmodules-export-file-collisions'
4cd153afe3 Merge branch 'backport-cxxmodules-export-file-collisions'
d791f3a180 cxxmodules: make export trampoline script files unique
2352dcc830 Source: Simplify hasher object construction

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9166
2024-01-19 10:54:20 -05:00
Kitware Robot
d07aee97fe CMake Nightly Date Stamp 2024-01-19 00:01:11 -05:00
Brad King
4cd153afe3 Merge branch 'backport-cxxmodules-export-file-collisions' 2024-01-18 17:45:07 -05:00
Ben Boeckel
d791f3a180 cxxmodules: make export trampoline script files unique
Include the name of the `EXPORT` in the filename when generating export
information for C++ modules. This allows the same directory to be used
for multiple sets of C++ module-using targets.

For `export(TARGETS)` uses, generate a name based on the hash of the
concatenation of the target names involved with the `export()` call.

Fixes: #25609
2024-01-18 17:40:44 -05:00
Brad King
2352dcc830 Source: Simplify hasher object construction 2024-01-18 17:40:32 -05:00
Brad King
45d53bdb70 CUDA/Clang: Do not pass explicit architecture flags when linking
Clang does not use architecture flags while driving the linker:

    warning: argument unused during compilation: '--cuda-gpu-arch=...'
2024-01-18 13:23:42 -05:00
Brad King
c75047709f Merge topic 'autogen-exe-per-config'
596e84b0d5 NinjaMultiConfig: Update tests for the new dependency change
7c39dabdbc Autogen: AUTO*_EXECUTABLE: add support for per-config values

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8919
2024-01-18 09:01:17 -05:00
Brad King
2debd9dd4e Merge topic 'isspace'
d9d9326e14 Source: Avoid out-of-range inputs to std::isspace()
14abdc8e2b cmXMLParser: Remove unused IsSpace method

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9162
2024-01-18 08:54:25 -05:00
Kitware Robot
bef9f0920f CMake Nightly Date Stamp 2024-01-18 00:01:10 -05:00
Brad King
d9d9326e14 Source: Avoid out-of-range inputs to std::isspace()
`isspace` takes `int` but documents that the value must be representable
by `unsigned char`, or be EOF.  Use a wrapper to cast to `unsigned char`
to avoid sign extension while converting to `int`.  This generalizes the
fix from commit 5e8c176e2a (cmExecuteProcessCommand: Cast c to unsigned
char before cast to int, 2024-01-05) to other `isspace` call sites.

This was detected by assertions in the MSVC standard library while
processing UTF-8 text.

Issue: #25561
2024-01-17 10:17:06 -05:00
Brad King
14abdc8e2b cmXMLParser: Remove unused IsSpace method 2024-01-17 10:15:44 -05:00
Orkun Tokdemir
7c39dabdbc Autogen: AUTO*_EXECUTABLE: add support for per-config values
* Per-config values were added to `AUTO*_EXECUTABLE`.
* Dependency order was refactored for `cmake_autogen` and `cmake_autorcc` to avoid unnecessary rebuilds.
* A new parameter was added for `cmake_autogen` and `cmake_autorcc` to specify the config name of the `auto*_executable` to be used.
* Add `AUTOGEN_BETTER_GRAPH_MULTI_CONFIG` target property to change the behavior of the dependency graph.
* The timestamp target is split into three targets for per-config to avoid redundant `mocs_compilation` builds when `AUTOGEN_BETTER_GRAPH_MULTI_CONFIG`	 is ON
* Per-config `DEP_FILE_RULE_NAME` values were added to `AutogenInfo.json` for `Multi-Config` usage.
* Some functions were refactored to avoid code duplication.

This commit reimplements fddd0f0443

Fixes: #20074
2024-01-17 16:02:58 +01:00
Brad King
fa4a499238 Merge topic 'cmake-language-exit-code'
1bb1769235 cmake_language: Add EXIT subcommand
4f160f7906 cmakemain: Return the SCRIPT_MODE exit code if it was set
b62dcbf5d2 cmMakefile: check cmake script mode exit code after command
3d9d504646 cmMakefile: Store the exit code from cmExecutionStatus to cmake instance
9f6c937408 Source/cmake.h: Add ScriptModeExitCode for proper storing exit code
1082b9cb9a cmExecutionStatus: Add ability to set optional custom exit code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Leonid Pospelov <pospelovlm@yandex.ru>
Acked-by: NoMaY (a user of Renesas Rulz Japanese Forum) <nomay-jp@outlook.com>
Merge-request: !8228
2024-01-17 09:53:46 -05:00
Brad King
c7ebec770f Merge topic 'lcc-updates-2024-01'
202f4b3161 Tests: Exclude some tests on broken libc on Elbrus
9dd0ab9c88 LCC: Make CMake build without warnings on LCC 1.21
1dbb31cea2 libarchive: avoid lchmod not implemented warning on old LCC
83af26d9ad LCC: Don't enable debugger on LCC that don't have <future>
fa764ce311 liblzma: Make cmliblzma buildable on LCC 1.21
77e046b47c jsoncpp: fix missing template deletion support on LCC < 1.23
67de0c197b cmcurl: fix X509_STORE_up_ref issue not just on LCC 1.23, but on LCC <= 1.23
9bc2aba3b4 LCC: get rid of ambiguous assignments of {} for LCC
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9157
2024-01-17 09:51:13 -05:00
Brad King
5394d79b35 Merge topic 'cxxmodules-obj-lib'
c09f8d27cd cxxmodules: compute link information for C++ module-consuming targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !9154
2024-01-17 09:36:45 -05:00
Kitware Robot
69b562c8ad CMake Nightly Date Stamp 2024-01-17 00:01:09 -05:00
makise-homura
9dd0ab9c88 LCC: Make CMake build without warnings on LCC 1.21 2024-01-16 22:12:07 +03:00
makise-homura
9bc2aba3b4 LCC: get rid of ambiguous assignments of {} for LCC
LCC 1.21 can't determine the exact type of right side
of assignment and so produces an error. Here it is resolved
by an intermediate variable.
2024-01-16 22:11:02 +03:00
Brad King
eee631bb8a Merge topic 'ewilde/swift-escapism'
9950a69f26 Swift/Ninja: Fix compile commands output file path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9150
2024-01-16 11:44:58 -05:00
leha-bot
1bb1769235 cmake_language: Add EXIT subcommand
Add tests to cover these cases:

* run as regular CMake module, in NORMAL_MODE (expected to fail);
* run as CMake script in SCRIPT_MODE (expected to exit with given code);
* run as CMake script that `include()`-s another script with EXIT subcommand;
* run as CMake script which EVAL-uates EXIT subcommand via
  `cmake_language(EVAL CODE "<cmake code>")`.

Fixes: #23162
2024-01-16 10:41:31 +03:00
leha-bot
4f160f7906 cmakemain: Return the SCRIPT_MODE exit code if it was set
We determine it via checking cmake.Run() return code and
ScriptModeExitCode. If ScriptModeExitCode is zero, then we would return
1 if retcode was non-zero. Otherwise it will be returned if retcode was
  also non-zero.
2024-01-16 10:41:31 +03:00
leha-bot
b62dcbf5d2 cmMakefile: check cmake script mode exit code after command
Which potentially may set it, and forward it to the cmExecutionStatus
for proper handling in caller.
2024-01-16 10:41:31 +03:00
leha-bot
3d9d504646 cmMakefile: Store the exit code from cmExecutionStatus to cmake instance 2024-01-16 10:41:31 +03:00
leha-bot
9f6c937408 Source/cmake.h: Add ScriptModeExitCode for proper storing exit code
From executed CMake script in SCRIPT_MODE.
2024-01-16 10:41:31 +03:00
leha-bot
1082b9cb9a cmExecutionStatus: Add ability to set optional custom exit code 2024-01-16 10:41:31 +03:00
Kitware Robot
a68d899874 CMake Nightly Date Stamp 2024-01-16 00:01:06 -05:00
Kitware Robot
76db09fd75 CMake Nightly Date Stamp 2024-01-15 00:01:56 -05:00
Matheus Izvekov
c09f8d27cd cxxmodules: compute link information for C++ module-consuming targets
Compute link information for all C++ targets which support
modules instead of just those which may provide modules, as
they may import modules as well. This captures `OBJECT` libraries using modules
which otherwise do not have link steps.

Fixes: #25592
2024-01-14 14:14:26 -03:00
Kitware Robot
8f85931b8a CMake Nightly Date Stamp 2024-01-14 00:01:10 -05:00