Commit Graph

35254 Commits

Author SHA1 Message Date
Kitware Robot 2cad910ecb CMake Nightly Date Stamp 2023-12-19 00:01:06 -05:00
Evan Wilde d31b48816c Swift/Ninja: Fix missing OFM in CMP0157 OLD behavior
The CMP0157 old behavior omitted the output-file-map after the Swift
build split because we stopped calling `EmitSwiftDependencyInfo` when we
could not split the build because we didn't call
`WriteObjectBuildStatement`. If we can't split the build, then we still
need to include the OFM information to not break incremental builds.
2023-12-18 19:42:53 -08:00
Marc Chevrier defbfd6f55 Xcode: Restore support for standalone IMPORTED_LOCATION_<CONFIG>
In commit 878ae03832 (macOS: IMPORTED framework: Honor SYSTEM target
property in all cases, 2023-08-27, v3.28.0-rc1~162^2) we broke support
for `IMPORTED_LOCATION_<CONFIG>` without `IMPORTED_CONFIGURATIONS`.
Previously it worked if the importing project's configurations match the
set of `IMPORTED_LOCATION_<CONFIG>` properties set.  Fix that case.

Fixes: #25506
Issue: #25515
2023-12-18 10:18:25 -05:00
Kitware Robot 43e6d30061 CMake Nightly Date Stamp 2023-12-18 00:01:56 -05:00
Kitware Robot daf8da8c80 CMake Nightly Date Stamp 2023-12-17 00:01:07 -05:00
Brad King ba41ca758a Merge topic 'swift-split-compilation-model'
9bed4f4d81 Swift/Ninja: Split compilation model
64b3367845 cmGlobalGenerator: Allow passing language to GetLangaugeOutputExtension

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8907
2023-12-16 07:15:41 -05:00
Kitware Robot 316bb67ff7 CMake Nightly Date Stamp 2023-12-16 00:01:08 -05:00
Brad King 6ba3bb0563 Merge topic 'cmake-test-launcher'
88863d83d6 fileapi: Add test launcher to codemodel-v2
1ec0372ed4 add_test: Optionally use a launcher for tests running in-project targets
478a5f4e04 fileapi: Make launcher attribute 'arguments' optional
b44e38a397 cmFileAPICodemodel: Add missing std::move()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8963
2023-12-15 09:34:20 -05:00
Evan Wilde 9bed4f4d81 Swift/Ninja: Split compilation model
Splitting the Swift build into an object build and a separate link step,
instead of building and linking in one step. The immediate benefit is
LSP support because we are able to emit compile-commands for Swift files
now. Additionally, it is possible to specify flags to the compile step,
enabling folks to emit C and C++ headers from their Swift builds for
C/C++ interop, without needing custom commands. Eventually, this gives
us a path toward working object libraries.

Object Libraries:
 - Object libraries don't work today because CMake doesn't emit targets
   for object libraries into the Ninja build file.
 - tl;dr: Object libraries work if they aren't WMO. Still need work to
   make WMO'd object libraries work.

   Object libraries still don't completely work with this patch because,
   while we emit the targets, the `TARGET_OBJECTS` generator expression
   expansion has a separate mechanism for determining what the names of
   the objects are based on the input source files, so targets that
   depend on an object library built with a whole-module optimization
   will depend on objects based on the name of the source file instead
   of the actual emitted object file.

These features require being able to accurately model wholemodule builds
though, because we actually need to track object files and WMO affects
what objects are emitted. For that, we require CMP0157 use the NEW
policy. When it's OLD, we have to fall back on the old behavior and
cannot provide object libraries or the compile-commands for LSP.

Issue: #25308
2023-12-15 05:51:13 -08:00
Kitware Robot dc4ce42b66 CMake Nightly Date Stamp 2023-12-15 00:01:05 -05:00
Brad King 1eed682d7c CMake 3.28.1 2023-12-14 10:47:27 -05:00
Kitware Robot 889dd287d3 CMake Nightly Date Stamp 2023-12-14 00:01:05 -05:00
Ralf Habacker 88863d83d6 fileapi: Add test launcher to codemodel-v2
We do not need to bump the minor version because it was recently bumped
by addition of the cross-compiling emulator as another kind of launcher.
2023-12-13 10:20:43 -05:00
Ralf Habacker 1ec0372ed4 add_test: Optionally use a launcher for tests running in-project targets
Add a `CMAKE_TEST_LAUNCHER` variable and corresponding `TEST_LAUNCHER`
target property.

Issue: #23672
2023-12-13 10:20:43 -05:00
Ralf Habacker 478a5f4e04 fileapi: Make launcher attribute 'arguments' optional
This was missed in commit 80a64c9ce5 (fileapi: Add cross-compiling
emulator to codemodel-v2, 2023-11-11).
2023-12-13 10:20:41 -05:00
Ralf Habacker b44e38a397 cmFileAPICodemodel: Add missing std::move()
This was missed in commit 80a64c9ce5 (fileapi: Add cross-compiling
emulator to codemodel-v2, 2023-11-11).
2023-12-13 10:19:38 -05:00
Kitware Robot 3f1a2c8d52 CMake Nightly Date Stamp 2023-12-13 00:01:05 -05:00
Brad King 9642647646 Merge topic 'create_test_sourcelist-full-filepath'
a29ca55b1f create_test_sourcelist: use the full path to the driver
609af7734f cmCreateTestSourceList: simplify string operations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9060
2023-12-12 08:41:57 -05:00
Brad King dbede7be7e Merge topic 'cmake-sources-no-scan'
91b7bf59a7 cmGlobalXCodeGenerator: disable C++ module scanning for force-lang files
9e19a61ddb cmLocalGenerator: disable C++ module scanning for unity sources
fa9a72a788 cmLocalGenerator: disable C++ module scanning for copied PCH sources
e5dce1a37e cmQtAutoGenInitializer: disable C++ module scanning for autogen sources
4fd596c34c cmGeneratorTarget: disable C++ module scanning for verify targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9064
2023-12-12 08:33:38 -05:00
Kitware Robot 9be8198bcc CMake Nightly Date Stamp 2023-12-12 00:01:04 -05:00
Ben Boeckel a29ca55b1f create_test_sourcelist: use the full path to the driver
When using `FILE_SET` syntax, full paths to out-of-source files are
needed as they are not searched for.
2023-12-11 12:15:28 -05:00
Ben Boeckel 609af7734f cmCreateTestSourceList: simplify string operations
Use `cmStrCat` where possible and use character literals instead of
length-1 string literals.
2023-12-11 12:15:28 -05:00
Ben Boeckel 91b7bf59a7 cmGlobalXCodeGenerator: disable C++ module scanning for force-lang files 2023-12-11 07:54:03 -05:00
Ben Boeckel 9e19a61ddb cmLocalGenerator: disable C++ module scanning for unity sources 2023-12-11 07:53:40 -05:00
Ben Boeckel fa9a72a788 cmLocalGenerator: disable C++ module scanning for copied PCH sources 2023-12-11 07:53:13 -05:00
Ben Boeckel e5dce1a37e cmQtAutoGenInitializer: disable C++ module scanning for autogen sources 2023-12-11 07:52:50 -05:00
Ben Boeckel 4fd596c34c cmGeneratorTarget: disable C++ module scanning for verify targets 2023-12-11 07:52:31 -05:00
Kitware Robot a6853135f5 CMake Nightly Date Stamp 2023-12-11 00:01:21 -05:00
Kitware Robot a51e61b997 CMake Nightly Date Stamp 2023-12-10 00:01:04 -05:00
Kitware Robot 41692ebb0a CMake Nightly Date Stamp 2023-12-09 00:01:05 -05:00
Kitware Robot be25b7c4f4 CMake Nightly Date Stamp 2023-12-08 00:01:05 -05:00
Brad King 944a9c35cc Merge topic 'makefiles-lwyu-module-libraries'
6b85c71ad8 Makefiles: Add LINK_WHAT_YOU_USE support for MODULE libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9042
2023-12-07 09:15:04 -05:00
Brad King f0deb107c5 Merge topic 'cmuvprocesschain-external-loop'
0b043a75b7 cmUVProcessChain: Add option for external uv_loop_t

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9040
2023-12-07 09:13:57 -05:00
Brad King f0539c353c Merge topic 'win-fs'
ad4481fa00 Source: Enhance check for C++17 filesystem support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9028
2023-12-07 09:12:43 -05:00
Kitware Robot 52145c117a CMake Nightly Date Stamp 2023-12-07 00:01:05 -05:00
Peter Kokot 6b85c71ad8 Makefiles: Add LINK_WHAT_YOU_USE support for MODULE libraries
This was accidentally left out by Makefile generators.
It already works with Ninja.

Fixes: #25480
2023-12-06 09:49:03 -05:00
Brad King 618fdc1c42 CMake 3.28.0 2023-12-06 08:57:42 -05:00
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 ef9cba9f42 Merge topic 'fix-cxx-module-transitive-requirements' into release-3.28
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:18 -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
Kyle Edwards 0b043a75b7 cmUVProcessChain: Add option for external uv_loop_t 2023-12-05 14:48:24 -05:00
Michael Hirsch ad4481fa00 Source: Enhance check for C++17 filesystem support
* Add `lexically_normal` test for all platforms.

* On Windows, MinGW does not currently handle `lexically_normal()`
  correctly on UNC path, but MSVC and IntelLLVM do--add a comment
  on this to avoid future confusion.

* Add test with `\\?\` notation and `weakly_canonical` that also triggers
  the MinGW bug, but is fine with MSVC and oneAPI, for a more robust and
  comprehensive test.
2023-12-05 11:30:08 -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