Commit Graph

35013 Commits

Author SHA1 Message Date
Brad King
e913ee37f3 Merge topic 'fix-cxx-module-transitive-requirements'
e9b0dcbbfa cmCxxModuleMapper: Fix transitive requirements computation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9030
2023-12-06 08:51:20 -05:00
Brad King
fb54e957d6 Merge topic 'imported-implib-only'
fc6508921c cmComputeLinkInformation: Restore soname lookup for non-imported targets
03d86f9d9c cmGeneratorTarget: Add helper to check for known runtime artifact

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !9041
2023-12-06 08:49:04 -05:00
Kitware Robot
98cbe24918 CMake Nightly Date Stamp 2023-12-06 00:01:13 -05:00
Brad King
fc6508921c cmComputeLinkInformation: Restore soname lookup for non-imported targets
In commit 7351d590ee (cmTarget: Add a way to represent imported shared
library stubs, 2023-07-17, v3.28.0-rc1~344^2) we accidentally stopped
passing the SONAME of a non-imported SHARED library to our runtime
search path ordering logic.  Unfortunately I have not found a way to add
a test case for this, but it at least shouldn't regress existing tests
or those added by that commit.
2023-12-05 15:50:56 -05:00
Brad King
03d86f9d9c cmGeneratorTarget: Add helper to check for known runtime artifact 2023-12-05 15:48:36 -05:00
namniav
e9b0dcbbfa cmCxxModuleMapper: Fix transitive requirements computation
Previously CMake may generate incomplete transitive requirements in
CMakeFiles/<target>.dir/CXXModules.json and therefore in module mapper
for compiler, when source files were listed in CMakeList.txt in a
certain order.

This commit fixes the problem by correctly tracking unfinished
transitive requirements computation of module units.

There have been a simple circular test case whose circular dependency
was reported by build system. Now with this correct implementation it's
reported by CMake generating module mappers.

Add two test cases for transitive requirements computation, one with
adding source files in hardcoded order, and the other in randomized
order.

Fixes: #25465
2023-12-05 10:26:10 -05:00
Brad King
0e7ef08e10 Merge topic 'RH-gcc-toolset-10-bug-check'
40af103402 cmCMakePath: do not use std::filesystem::path with RH gcc-toolset-10

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9026
2023-12-05 09:29:45 -05:00
Brad King
3e8f021137 Merge topic 'RH-gcc-toolset-10-bug-check' into release-3.28
40af103402 cmCMakePath: do not use std::filesystem::path with RH gcc-toolset-10

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9026
2023-12-05 09:29:44 -05:00
Brad King
e05cd2871d Merge topic 'cxxmodules-pch'
40dc13b242 cmNinjaTargetGenerator: PCH files do not need dyndep
f61c64cd1c cmLocalGenerator: prevent scanning of PCH source files
ea8c37b759 Tests/CXXModules: add a test which scans a PCH-using source

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9032
2023-12-05 09:25:51 -05:00
Brad King
d301276bf5 Merge topic 'cxxmodules-pch' into release-3.28
40dc13b242 cmNinjaTargetGenerator: PCH files do not need dyndep
f61c64cd1c cmLocalGenerator: prevent scanning of PCH source files
ea8c37b759 Tests/CXXModules: add a test which scans a PCH-using source

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9032
2023-12-05 09:25:50 -05:00
Brad King
d101cb07ec Merge topic 'cmFileCopier-error-loss'
a820877d03 errors: avoid constructing a stream before getting the last error
5cf7018af6 cmFileCopier: remember error statuses and get their strings
0639a32d3a cmFileTimes: return status codes from APIs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9023
2023-12-05 09:23:49 -05:00
Brad King
8c1da0b4bf Merge topic 'cmFileCopier-error-loss' into release-3.28
a820877d03 errors: avoid constructing a stream before getting the last error
5cf7018af6 cmFileCopier: remember error statuses and get their strings
0639a32d3a cmFileTimes: return status codes from APIs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9023
2023-12-05 09:23:48 -05:00
Brad King
0ab6a1e9d1 Merge topic 'fix-include-windows'
696e14d977 cmFileLockResult: Fix inclusion of windows.h when cross-compiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9035
2023-12-05 09:22:42 -05:00
Kitware Robot
60fa02de1c CMake Nightly Date Stamp 2023-12-05 00:01:14 -05:00
Brad King
696e14d977 cmFileLockResult: Fix inclusion of windows.h when cross-compiling
In commit 64821d8a26 (cmFileLockResult: Remove expensive windows.h
include, 2023-06-16, v3.28.0-rc1~446^2~13) we accidentally capitalized
the name of the header.  This matters when cross-compiling from a host
with a case-sensitive filesystem.

Fixes: #25474
2023-12-04 16:52:24 -05:00
Marc Chevrier
40af103402 cmCMakePath: do not use std::filesystem::path with RH gcc-toolset-10
Fixes: #25458, #25453
2023-12-04 17:39:06 +01:00
Brad King
ef89ad6c55 Merge topic 'ctest-jobserver-client'
80fe56c481 ctest: Add support for running under a make job server on POSIX systems
5396f4a9a3 cmUVJobServerClient: Add libuv-based job server integration client

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9021
2023-12-04 09:47:25 -05:00
Brad King
9cb1471ff6 Merge topic 'fileapi-exe-launcher'
80a64c9ce5 fileapi: Add cross-compiling emulator to codemodel-v2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8964
2023-12-04 09:43:05 -05:00
Brad King
4b13f8866d Merge topic 'cmake-non-writable-build-dir'
0fd64345fe Tests: Add case covering non-writable CMAKE_BINARY_DIR
d91c02e40f Tests: Factor out RunCMake helper to get UNIX user id
5799d0e788 cmake: Improve error message if CMAKE_BINARY_DIR not writable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !8970
2023-12-04 09:40:20 -05:00
Ben Boeckel
40dc13b242 cmNinjaTargetGenerator: PCH files do not need dyndep
Fixes: #24209
2023-12-04 08:43:45 -05:00
Ben Boeckel
f61c64cd1c cmLocalGenerator: prevent scanning of PCH source files 2023-12-04 08:43:45 -05:00
Kitware Robot
f72ffe9f7f CMake Nightly Date Stamp 2023-12-04 00:01:36 -05:00
Brad King
80fe56c481 ctest: Add support for running under a make job server on POSIX systems
Share job slots with the job server by acquiring a token before running
each test, and releasing the token when the test finishes.
2023-12-03 08:30:07 -05:00
Brad King
5396f4a9a3 cmUVJobServerClient: Add libuv-based job server integration client 2023-12-03 08:30:06 -05:00
Brad King
714a946781 Merge topic 'uv-handle-bool'
47fbb29ad7 cmUVHandlePtr: Fix conversion to bool on Oracle Studio compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9024
2023-12-03 08:29:20 -05:00
Kitware Robot
02c63208d8 CMake Nightly Date Stamp 2023-12-03 00:01:09 -05:00
Brad King
47fbb29ad7 cmUVHandlePtr: Fix conversion to bool on Oracle Studio compiler
The operator added by commit 17690558c3 (cmUVHandlePtr: Add explicit
conversion to bool, 2023-10-26) works in direct expressions like
`if(foo)` but not compound expressions like `if(foo && ...)`.
Drop the `explicit` mark when compiling with Oracle Studio so we
can at least compile valid code.
2023-12-02 06:37:40 -05:00
Kitware Robot
c01cadc664 CMake Nightly Date Stamp 2023-12-02 00:01:10 -05:00
Ben Boeckel
a820877d03 errors: avoid constructing a stream before getting the last error
Constructing a stream may involve operations that change the global
error state. Avoid the streams by using `cmStrCat` instead.
2023-12-01 22:58:05 -05:00
Ben Boeckel
5cf7018af6 cmFileCopier: remember error statuses and get their strings
The last error may have changed between the original call and the
`GetLastSystemError()` call. Remember the status explicitly and ask it
for its error string.

Reported on Discourse: https://discourse.cmake.org/t/9539
2023-12-01 22:58:05 -05:00
Ben Boeckel
0639a32d3a cmFileTimes: return status codes from APIs
This avoids accidentally overwriting the global error state before
fetching the intended error code.
2023-12-01 22:58:05 -05:00
Ralf Habacker
80a64c9ce5 fileapi: Add cross-compiling emulator to codemodel-v2
Fixes: #25408
2023-12-01 10:57:15 -05:00
Brad King
b52f824577 Merge topic 'xcode-embed-xpc-services'
2b4bb43ed3 Xcode: Add support to embed XPC Services

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9006
2023-12-01 09:05:00 -05:00
Kitware Robot
67592a29bc CMake Nightly Date Stamp 2023-12-01 00:01:09 -05:00
scivision
5799d0e788 cmake: Improve error message if CMAKE_BINARY_DIR not writable
Fixes: #24407
2023-11-30 14:23:57 -05:00
Brad King
8bd78627dd CMake 3.28.0-rc6 2023-11-30 13:13:15 -05:00
Brad King
8d6dcaa4b0 Merge topic 'LINK_LIBRARY-genex-with-INTERFACE_LINK_LIBRARIES_DIRECT'
9798482a8c LINK_LIBRARY-genex: correct behavior for INTERFACE_LINK_LIBRARIES_DIRECT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8992
2023-11-30 09:08:53 -05:00
Brad King
d56de8ae46 Merge topic 'remove-non-readable-dir'
9718c312b6 Tests: Avoid leaving behind non-readable directories
2e82ba70b3 Tests: Avoid creating world-writable paths
5589bcb1bf Tests: Fix directory removal in RunCMake.if test
165bf3252f Merge branch 'upstream-KWSys' into remove-write-only-dir
22a759b5b5 KWSys 2023-11-29 (433f3d23)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9015
2023-11-30 09:07:02 -05:00
Brad King
6f936245c2 Merge topic 'ccmake-install-rds-crash'
d01120a47a cmGlobalGenerator: clear RuntimeDependencySet members at configure

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9013
2023-11-30 09:03:51 -05:00
Brad King
d2167f7224 Merge topic 'ccmake-install-rds-crash' into release-3.28
d01120a47a cmGlobalGenerator: clear RuntimeDependencySet members at configure

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9013
2023-11-30 09:03:50 -05:00
Kitware Robot
8b16e718b2 CMake Nightly Date Stamp 2023-11-30 00:01:08 -05:00
Jonathan Earnshaw
2b4bb43ed3 Xcode: Add support to embed XPC Services 2023-11-30 10:09:34 +13:00
Marc Chevrier
9798482a8c LINK_LIBRARY-genex: correct behavior for INTERFACE_LINK_LIBRARIES_DIRECT
Fixes: #25416
2023-11-29 11:26:52 -05:00
Ben Boeckel
d01120a47a cmGlobalGenerator: clear RuntimeDependencySet members at configure
Commit f2617cf8e6 (Source: Add cmInstallRuntimeDependencySet,
2021-05-19) introduced via !6186 to 3.21 added storage to the global
generator for runtime dependency sets. However, this was not cleared at
the start of configure in the `ClearGeneratorMembers()` method. When
using `ccmake` to configure (and, presumably `cmake-gui` too), projects
using `install(TARGETS … RUNTIME_DEPENDENCY_SET)` would use dependency
set tracking instances from previous configure runs that held references
to targets free'd with the `cmMakefile` instance that held them.

Clear the dependency sets at the beginning of configure so that they are
not remembered and trigger via use-after-free bugs when used.

Fixes: #25446
2023-11-29 08:34:21 -05:00
Brad King
165bf3252f Merge branch 'upstream-KWSys' into remove-write-only-dir
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2023-11-29 (433f3d23)
2023-11-29 07:54:36 -05:00
Brad King
baafd7a874 Merge topic 'cxxmodules-diagnostics'
cbd549b09e cxxmodules: Add more suggestions to no-modules-support diagnostics

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9011
2023-11-29 07:51:42 -05:00
Brad King
1b82da7e15 Merge topic 'cxxmodules-diagnostics' into release-3.28
cbd549b09e cxxmodules: Add more suggestions to no-modules-support diagnostics

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9011
2023-11-29 07:51:41 -05:00
Brad King
91d3fe1638 Merge topic 'xcode-embed-resources'
6030df205a Xcode: Fix embed resources prop name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Deal <halx99@live.com>
Merge-request: !9008
2023-11-29 07:50:04 -05:00
Kitware Robot
3a1af958ee CMake Nightly Date Stamp 2023-11-29 00:01:15 -05:00
Brad King
cbd549b09e cxxmodules: Add more suggestions to no-modules-support diagnostics
Tell users what generators *do* support C++ modules.  Report the current
generator to make clear it is not one of those supporting modules.
Also clarify the purpose of the existing documentation references.
2023-11-28 14:36:16 -05:00