Commit Graph

35207 Commits

Author SHA1 Message Date
Kitware Robot
3cd2c59ecf CMake Nightly Date Stamp 2024-01-30 00:01:09 -05:00
Brad King
622a498477 Merge topic 'test-launcher-emulator-genex'
13ece67a58 Add genex support to TEST_LAUNCHER and CROSSCOMPILING_EMULATOR
b9ad73fcb2 cmTestGenerator: De-duplicate TEST_LAUNCHER and CROSSCOMPILING_EMULATOR impl

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9198
2024-01-29 10:50:34 -05:00
Brad King
28e89baa22 Merge topic 'autogen-makefile-depfile'
d0bedb2170 Autogen: Forward dependencies when both Makefile and DEPFILE are used
4deb9c41b8 cmQtAutoGenInitializer: Improve Const-correctness

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9190
2024-01-29 10:43:45 -05:00
Brad King
d377ccbf67 Merge topic 'productbuild-domains-policy'
339ae33e55 CPack: Change CPACK_PRODUCTBUILD_DOMAINS default to true (CMP0161)
4e7f2397e4 CPack: Clear temporary variable after it is no longer needed

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9197
2024-01-29 10:36:22 -05:00
Brad King
13ece67a58 Add genex support to TEST_LAUNCHER and CROSSCOMPILING_EMULATOR
Evaluate generator expressions in these properties, as they apply to
`add_test`, `add_custom_command`, and `add_custom_target`.

The `CMAKE_CROSSCOMPILING_EMULATOR` variable's `try_run` behavior occurs
at configure time and so cannot support generator expressions.
2024-01-29 10:30:24 -05:00
Brad King
b9ad73fcb2 cmTestGenerator: De-duplicate TEST_LAUNCHER and CROSSCOMPILING_EMULATOR impl 2024-01-29 10:29:45 -05:00
Kitware Robot
9d081a071e CMake Nightly Date Stamp 2024-01-29 00:01:31 -05:00
Orkun Tokdemir
d0bedb2170 Autogen: Forward dependencies when both Makefile and DEPFILE are used
Since commit ebc9e448b3 (Autogen: Add depfile support for Makefiles,
2023-09-07, v3.28.0-rc1~101^2~1) CMake does not generate the correct
dependency graph when both `Makefile` and `DEPFILE` are used.
The build of `<target_name>_autogen_timestamp_deps` fails due to
missing dependencies.  To tackle that problem, forward target
dependencies to both `<target_name>_autogen_timestamp_deps` and
`<target_name>_autogen` instead of just `<target_name>_autogen`.

Fixes: #25600
2024-01-28 09:40:47 -05:00
Craig Scott
339ae33e55 CPack: Change CPACK_PRODUCTBUILD_DOMAINS default to true (CMP0161)
Fixes: #23351
2024-01-28 21:09:12 +11:00
Kitware Robot
f0d958d0b4 CMake Nightly Date Stamp 2024-01-28 00:01:08 -05:00
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
Orkun Tokdemir
4deb9c41b8 cmQtAutoGenInitializer: Improve Const-correctness 2024-01-26 09:50:35 -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
bcbb212df7 Revert use of libuv for process execution for 3.28
Wide use of CMake 3.28.{1,0[-rcN]} has uncovered some hangs and crashes
in libuv SIGCHLD handling on some platforms, particularly in virtualization
environments on macOS hosts.  Although the bug does not seem to be in CMake,
we can restore stability in the CMake 3.28 release series for users of such
platforms by reverting our new uses of libuv for process execution.

Revert implementation changes merged by commit 4771544386 (Merge topic
'replace-cmsysprocess-with-cmuvprocesschain', 2023-09-06, v3.28.0-rc1~138),
but keep test suite updates.

Issue: #25414, #25500, #25562, #25589
2024-01-24 17:10:00 -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