Commit Graph

34972 Commits

Author SHA1 Message Date
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
Kitware Robot 8b16e718b2 CMake Nightly Date Stamp 2023-11-30 00:01:08 -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 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
halx99 6030df205a Xcode: Fix embed resources prop name
Fix commit e40d2cb3af (Xcode: Add embed resources support, 2023-07-31,
v3.28.0-rc1~281^2).  The implementation should not name the `_PATH`
suffix explicitly.  That variant is automatically handled by
`cmGlobalXCodeGenerator::AddEmbeddedObjects`.
2023-11-28 12:06:29 -05:00
Kitware Robot 2d0b7798db CMake Nightly Date Stamp 2023-11-28 00:01:11 -05:00
Brad King 5fbc24a31d Merge topic 'ctest-cleanup'
0432b921ae cmCTestMultiProcessHandler: Inline removal of pending test as it starts
b17c732e88 cmCTestMultiProcessHandler: Clarify role of StartTestProcess
0950acb337 cmCTestMultiProcessHandler: Manage concurrency slots with other resources
697900da29 cmCTestMultiProcessHandler: Manage affinity assignments with other resources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8999
2023-11-27 08:44:12 -05:00
Brad King b52e30c37a Merge topic 'uv-write'
7ee5fb01c6 cmUVHandlePtr: Add uv_write wrapper to manage request lifetime
bec0dd93a3 cmUVHandlePtr: Add explicit uv_loop_ptr::operator*

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8997
2023-11-27 08:43:29 -05:00
Brad King 81e836e0fe Merge topic 'vs-ifx'
43d218d970 VS: Add support for using Intel oneAPI Fortran compiler in .vfproj files
5c77facd78 VS: Fix Intel plugin version detection fallback

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9001
2023-11-27 08:41:55 -05:00
Brad King c2bd158712 Merge topic 'fortran-objects-as-sources-fix'
beb1393f8f Merge branch 'revert-exact-collation-depends-3.27' into fortran-objects-as-sources-fix
a033dce326 Makefiles: provide, but do not consume, "forward linked" target dirs
7cd0adab1b cmCommonTargetGenerator: use modules from linked object-referenced targets
1175f1c874 LinkItem: track `cmSourceFile` instances for external objects
d2fa56772f Ninja: support "forwarding" modules from other targets
ec1e589bec Ninja: Revert exact collation dependencies for 3.27
06df59b930 cmCommonTargetGenerator: return forward linked target dirs too
f8729ab366 cmLocalUnixMakefileGenerator3: handle object-referencing Fortran modules
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8989
2023-11-27 08:36:45 -05:00
Kitware Robot 89cfb90b9c CMake Nightly Date Stamp 2023-11-27 00:01:19 -05:00
Kitware Robot 61e3ea8dc9 CMake Nightly Date Stamp 2023-11-26 00:01:08 -05:00
Kitware Robot 5234fcdbca CMake Nightly Date Stamp 2023-11-25 00:01:08 -05:00
Kitware Robot dc03936add CMake Nightly Date Stamp 2023-11-24 00:01:08 -05:00
Ben Boeckel a033dce326 Makefiles: provide, but do not consume, "forward linked" target dirs
Makefiles do not have a per-object sense of where they come from, so
forwarding any module information here would end up with incorrect
module file path construction by consuming targets. Leave a TODO item in
its place.
2023-11-23 14:26:31 -05:00
Ben Boeckel 7cd0adab1b cmCommonTargetGenerator: use modules from linked object-referenced targets
Fortran modules provided by objects added as linked items via
`$<TARGET_OBJECTS>` should also be considered as "linked targets" for
collation purposes. As C++ modules have their own visibility rules
through their `FILE_SET` feature, do not expose these for C++ module
collation.
2023-11-23 14:26:31 -05:00
Ben Boeckel 1175f1c874 LinkItem: track cmSourceFile instances for external objects
The target may be required in order to provide Fortran modules, so track
the source file so that the target may be looked up when needed.
2023-11-23 14:26:31 -05:00
Ben Boeckel d2fa56772f Ninja: support "forwarding" modules from other targets
When a target uses objects from another target which provides modules as
sources, the modules provided by the referenced target must also be
treated as if they were provided by the referencing target. Add the
concept of "forwarding" modules so that consumers can use modules
created by these sources as well.

Note that this is only sensible for Fortran where module usages are
implicit as far as CMake's visibility model is concerned. C++ modules
have their own concept of visibility which does not require or support
such `$<TARGET_OBJECTS>` reuse in this way.
2023-11-23 14:25:09 -05:00
Kitware Robot 20a70ab6ca CMake Nightly Date Stamp 2023-11-23 00:01:09 -05:00
Brad King 43d218d970 VS: Add support for using Intel oneAPI Fortran compiler in .vfproj files
Add a `fortran={ifort,ifx}` field to `CMAKE_GENERATOR_TOOLSET` to
specify which Intel Fortran compiler to use.

Fixes: #25427
2023-11-22 10:22:12 -05:00
Brad King 5c77facd78 VS: Fix Intel plugin version detection fallback
Do not read a value that was not parsed.
2023-11-22 09:53:26 -05:00
Brad King 0432b921ae cmCTestMultiProcessHandler: Inline removal of pending test as it starts
Avoid searching the entire list of ordered pending tests to remove one
when we already know where it is.
2023-11-22 07:49:04 -05:00
Brad King b17c732e88 cmCTestMultiProcessHandler: Clarify role of StartTestProcess
Focus its role on actually running the test process.
Move administrative tasks to the call site.
2023-11-22 07:49:04 -05:00
Brad King 0950acb337 cmCTestMultiProcessHandler: Manage concurrency slots with other resources 2023-11-22 07:49:04 -05:00
Brad King 697900da29 cmCTestMultiProcessHandler: Manage affinity assignments with other resources 2023-11-22 07:49:04 -05:00
Brad King 1d963973b9 Merge topic 'ctest-loop-idle'
086a41c0f3 cmCTestMultiProcessHandler: Simplify test startup batching
e528cd795f cmCTestMultiProcessHandler: Start new tests asynchronously
9d8415c17b cmCTestMultiProcessHandler: Clarify test-load retry timer infrastructure
61e98ca33b cmCTestMultiProcessHandler: Factor out loop startup and teardown
5ff0b4ed57 cmCTestMultiProcessHandler: Consolidate test readiness checks
ad3df3ce4d cmCTestMultiProcessHandler: Exclude dependent tests earlier
3c4767f467 cmCTestTestHandler: Clarify name of member storing RESOURCE_LOCK property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8995
2023-11-22 07:25:04 -05:00
Brad King 7ee5fb01c6 cmUVHandlePtr: Add uv_write wrapper to manage request lifetime
Provide a way to synchronously cancel a write request callback.
2023-11-22 07:12:38 -05:00
Kitware Robot 1db4d34694 CMake Nightly Date Stamp 2023-11-22 00:01:07 -05:00
Brad King bec0dd93a3 cmUVHandlePtr: Add explicit uv_loop_ptr::operator*
Previously the dereferencing operator was implicitly available
due to `operator uv_loop_t*() const`.  Make it explicit.
2023-11-21 13:53:23 -05:00
Brad King 086a41c0f3 cmCTestMultiProcessHandler: Simplify test startup batching
Once a test is ready to run, count it against the number of tests to
start in the current batch whether or not the test process actually
starts successfully.  If a test process does fail to start, simply
schedule a new startup batch on the next loop iteration.
2023-11-21 12:40:13 -05:00
Brad King e528cd795f cmCTestMultiProcessHandler: Start new tests asynchronously
When a test finishes, defer starting new tests until the next loop
iteration.  That way, if multiple tests finish in a single loop
iteration, we can free all of their resources first, and then start
a new batch of tests.
2023-11-21 12:37:53 -05:00
Brad King 9d8415c17b cmCTestMultiProcessHandler: Clarify test-load retry timer infrastructure 2023-11-21 12:37:41 -05:00
Brad King 61e98ca33b cmCTestMultiProcessHandler: Factor out loop startup and teardown 2023-11-21 12:37:31 -05:00
Brad King 5ff0b4ed57 cmCTestMultiProcessHandler: Consolidate test readiness checks 2023-11-21 12:36:31 -05:00
Ben Boeckel 06df59b930 cmCommonTargetGenerator: return forward linked target dirs too
This will be used for module forwarding in order to support
`$<TARGET_OBJECTS>` usage in source and link libraries calls.
2023-11-21 09:44:39 -05:00
Ben Boeckel f8729ab366 cmLocalUnixMakefileGenerator3: handle object-referencing Fortran modules
Targets only using Fortran modules via `$<TARGET_OBJECTS>` also need a
collation step to be performed. Check for this case and trigger the
depends rule to be used.
2023-11-21 09:43:49 -05:00
Ben Boeckel 6afe841e62 cmNinjaTargetGenerator: handle object-referencing Fortran modules
Targets only using Fortran modules via `$<TARGET_OBJECTS>` also need a
collation step to be performed. Check for this case and trigger the
collation rule to be added and used.
2023-11-21 09:43:47 -05:00
Ben Boeckel c1fc5455b1 cmGeneratorTarget: also check included objects for Fortran modules
Fortran modules provided by objects in `$<TARGET_OBJECTS>` should also
count as "has Fortran modules" for the target referencing the objects.
2023-11-21 09:43:17 -05:00
Ben Boeckel 515ca5fcd1 cmCommonTargetGenerator: use modules from object-referenced targets
Fortran modules provided by objects added as sources via
`$<TARGET_OBJECTS>` should also be considered as "linked targets" for
collation purposes. As C++ modules have their own visibility rules
through their `FILE_SET` feature, do not expose these for C++ module
collation.
2023-11-21 09:42:58 -05:00
Ben Boeckel d8182105a1 cmGeneratorTarget: add a query for targets with objects in the source list
This will be eventually be used to inform the collator of this
information so that Fortran modules provided by the resulting objects
can also be used as intended.
2023-11-21 09:42:58 -05:00
Ben Boeckel ee4e85e615 cmGeneratorTarget: use pointers to const generator targets for languages 2023-11-21 09:42:58 -05:00
Ben Boeckel b34a8fcb8e cmGeneratorTarget: track object libraries using a set
This avoids having to do manual "is already present" checks. The order
the targets are processed does not need to be preserved because the
resulting `languages` result is already a `set`.
2023-11-21 09:42:58 -05:00
Brad King ad3df3ce4d cmCTestMultiProcessHandler: Exclude dependent tests earlier
Tests with unfinished dependencies should not be considered at all when
looking for tests that fit within the load and concurrency limits.
2023-11-21 08:29:17 -05:00
Brad King 3c4767f467 cmCTestTestHandler: Clarify name of member storing RESOURCE_LOCK property
The property represents project-defined resources.
2023-11-21 08:29:17 -05:00
Brad King 773fd7e05d Merge topic 'uv-handle-start-stop'
fb7ee82271 cmUVHandlePtr: Add uv_idle_ptr::{start,stop} methods
9dd14b2946 cmUVHandlePtr: Add uv_timer_ptr::stop method
8908f277d9 Tests: Add dedicated test case for uv_timer_ptr
f906e2482f Tests: Factor out callback in uv_idle_ptr test case
89435a5662 Tests: Add dedicated test to cover cmUVHandlePtr types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8993
2023-11-21 07:56:44 -05:00