Commit Graph

62910 Commits

Author SHA1 Message Date
Ben Boeckel
48ee946fdc cmExperimental: recycle the C++ modules API UUID
Supporting modules on IMPORTED targets is worth an update.
2023-08-17 14:42:54 -04:00
Ben Boeckel
1a1806a71b gitlab-ci: declare bmionly support for modules where possible
GCC and Clang both have the settings.
2023-08-17 14:42:54 -04:00
Ben Boeckel
457a12f3f9 Tests/RunCMake/CXXModules: add tests which use modules from imported targets 2023-08-17 14:42:54 -04:00
Ben Boeckel
9b9ec70b54 Ninja: generate scanning and build rules for C++20 module synthetic targets 2023-08-17 14:42:54 -04:00
Ben Boeckel
80ef50a191 CXXModules: add a variable for BMI-only compilation
This will be required when dealing with imported targets which contain
modules.
2023-08-17 14:42:54 -04:00
Ben Boeckel
80d6544398 cxxmodules: generate synthetic targets as an initial pass
We need to be able to construct BMIs that will be usable from the client
modules for the target importing the module, so create BMI-only
compilation rules for `IMPORTED` targets to create these BMIs.
2023-08-17 14:42:53 -04:00
Ben Boeckel
3dc6676ecc cmSyntheticTargetCache: add a struct for synthetic target caching 2023-08-17 14:42:53 -04:00
Ben Boeckel
cb356b540c cmCxxModuleUsageEffects: add a class to capture module usage effects
When importing a C++ module, there may be requirements imposed by the
importer so that the compiler can reliably read the BMI. For example,
the standard used in the importer may need to also apply to the imported
BMI.

Right now, there are no tracked requirements. As we learn more, this
class can start tracking more information.

See: https://wg21.link/p2581r2
2023-08-17 14:42:53 -04:00
Ben Boeckel
c1defd9dd3 cmDyndepCollation: add initializers for POD types
This avoids invalid states from existing.
2023-08-17 14:42:53 -04:00
Ben Boeckel
a53748e319 cmDyndepCollation: add a query for whether an object is BMI-only
The collator needs to know that the object *is* a BMI so that it can
just use the location directly.
2023-08-17 14:42:53 -04:00
Ben Boeckel
9840bfdab0 cmDyndepCollation: support BMI-only collation 2023-08-17 14:42:53 -04:00
Ben Boeckel
caf5971c8a cmTarget: report that synthetic targets can compile sources 2023-08-17 14:42:53 -04:00
Ben Boeckel
3a8ea5c3a0 cmTarget: rename entry copying method
It will also be used to copy from other targets, not just directories.
2023-08-17 14:42:53 -04:00
Ben Boeckel
1ccf25b049 cmTarget: track and store IMPORTED_CXX_MODULES_ usage properties
While not "usage requirements" directly, when applied to a target that
will eventually have the BMI compile rules attached to them, they need
tracked as such.
2023-08-17 14:42:53 -04:00
Ben Boeckel
159585967a cmGeneratorTarget: classify BMI-only C++ module sources 2023-08-17 14:42:53 -04:00
Ben Boeckel
7b069510c5 cmImportedCxxModuleInfo: introduce code to parse exported BMI properties 2023-08-17 14:42:53 -04:00
Ben Boeckel
249cd3efad cmExportFileGenerator: export private compile info for C++ modules
When consuming exported targets which contain C++ modules, the consuming
project must be able to recompile BMI files using the original target's
flags. This is because a module source may use some private target usage
requirement but not want to propagate it to consumers. To facilitate
this, export the private information as necessary for consumers to be
able to perform the BMI compilations.
2023-08-17 14:42:53 -04:00
Ben Boeckel
1690e451f7 cmGeneratorTarget: support better errors when checking for C++20 modules
Some callers have their own error reporting mechanisms which give more
context. Support handing off the error string for these use cases.
2023-08-16 10:40:11 -04:00
Kyle Edwards
58d27dc6db Merge topic 'xcframework-check-platform-variant'
b4565c8c91 .xcframework: Check SupportedPlatformVariant

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8713
2023-08-16 10:26:00 -04:00
Brad King
c754f0d263 Merge topic 'remove_property'
822203dd65 Source: Rename SetProperty(nullptr_t) to RemoveProperty()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !8721
2023-08-16 10:04:06 -04:00
Brad King
ae23cf0f29 Merge topic 'ci-gcc-p1689r5-v7'
6d359ce7a0 gitlab-ci: use the new GCC C++ modules build container
0d837ba0f0 ci: update gcc module rules file for new flag spellings
945c4b1771 ci: update to Fedora 38 for GCC C++ module container
38251e00e1 ci: update to v7 of the GCC p1689r5 patches

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8710
2023-08-16 10:03:12 -04:00
Brad King
0386f0d098 Merge topic 'improve_rpath_removal_message'
c85fd9a705 file: Clarify CMake only drops RPATHS's it added

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8715
2023-08-16 10:01:34 -04:00
Brad King
5d41ed9737 Merge topic 'ExternalProject-build-jobserver'
bc43398e72 ExternalProject: Enable Make Job Server with Explicit Build Command
99be022428 Tests/RunCMake/Make: simplify GNUMakeJobSeverAware check function

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8667
2023-08-16 09:59:27 -04:00
Brad King
2f3e8447be Merge branch 'release-3.27' 2023-08-16 09:48:02 -04:00
Brad King
cdbb166fbd Merge topic 'unity_c_no_extensions'
7f7c443667 Unity: use C-style comments to work both with C and C++

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8718
2023-08-16 09:48:02 -04:00
Brad King
71324ce879 Merge topic 'unity_c_no_extensions' into release-3.27
7f7c443667 Unity: use C-style comments to work both with C and C++

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8718
2023-08-16 09:48:01 -04:00
Brad King
e701c0e32c Merge branch 'release-3.27' 2023-08-16 09:46:36 -04:00
Brad King
b931fbd1b8 Merge topic 'ghs-escape-custom-command-comments'
5a41d926dd GHS: Escape custom command comments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8714
2023-08-16 09:46:36 -04:00
Brad King
9cde869b11 Merge topic 'ghs-escape-custom-command-comments' into release-3.27
5a41d926dd GHS: Escape custom command comments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8714
2023-08-16 09:46:35 -04:00
Brad King
d667565d10 Merge branch 'release-3.27' 2023-08-16 09:44:48 -04:00
Brad King
04f2c4b199 Merge topic 'clang_c23'
65288eb92a Clang: use -std=c23 for Clang 18+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8716
2023-08-16 09:44:48 -04:00
Brad King
fcb944a11b Merge topic 'clang_c23' into release-3.27
65288eb92a Clang: use -std=c23 for Clang 18+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8716
2023-08-16 09:44:47 -04:00
Brad King
56a9c6e27e Merge branch 'release-3.27' 2023-08-16 09:42:54 -04:00
Brad King
ab379e5054 Merge topic 'FindPython-3.13'
dfab044c44 FindPython: add support for Python 3.13

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8712
2023-08-16 09:42:53 -04:00
Brad King
d8ef731738 Merge topic 'FindPython-3.13' into release-3.27
dfab044c44 FindPython: add support for Python 3.13

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8712
2023-08-16 09:42:52 -04:00
Kitware Robot
e70749e0d6 CMake Nightly Date Stamp 2023-08-16 00:01:15 -04:00
Robert Maynard
c85fd9a705 file: Clarify CMake only drops RPATHS's it added 2023-08-15 14:59:14 -04:00
Vitaly Stakhovsky
822203dd65 Source: Rename SetProperty(nullptr_t) to RemoveProperty()
Avoid assignment to NULL semantics.
2023-08-15 12:13:56 -04:00
Ben Boeckel
6d359ce7a0 gitlab-ci: use the new GCC C++ modules build container 2023-08-15 10:25:42 -04:00
Sylvain Joubert
7f7c443667 Unity: use C-style comments to work both with C and C++
Update the comment added by commit 485256f2d0 (Unity: Suppress
clang-tidy 'bugprone-suspicious-include' warning, 2023-04-27,
v3.27.0-rc1~149^2) to work for C.

Fixes: #25184
2023-08-15 10:23:54 -04:00
William Sciaroni
5a41d926dd GHS: Escape custom command comments
Fixes: #25171
2023-08-15 09:53:41 -04:00
Kyle Edwards
b4565c8c91 .xcframework: Check SupportedPlatformVariant 2023-08-15 09:45:17 -04:00
Raul Tambre
65288eb92a Clang: use -std=c23 for Clang 18+
Canonical flag changed in LLVM commit 13629b140801870feff855ca168edf6b34dbef8d.
2023-08-15 09:43:48 -04:00
Vasily Ryabov
dfab044c44 FindPython: add support for Python 3.13
Python 3.13.0a0 can be built from main branch of python/cpython though
there were no official releases yet.
2023-08-15 09:39:43 -04:00
Brad King
d688a213d5 Merge branch 'release-3.27' 2023-08-15 09:35:08 -04:00
Brad King
969b07ba8e Merge topic 'TAPI-is-Apple-only'
8b0f0dc257 Apple Text Stubs (.tbd): various fixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8708
2023-08-15 09:35:08 -04:00
Brad King
955d2b8847 Merge topic 'TAPI-is-Apple-only' into release-3.27
8b0f0dc257 Apple Text Stubs (.tbd): various fixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8708
2023-08-15 09:35:07 -04:00
Brad King
70df49549f Merge branch 'release-3.27' 2023-08-15 09:34:17 -04:00
Brad King
d1130ea704 Merge topic 'FindJNI-no-xcode'
597139b853 FindJNI: Restore support for macOS without Xcode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8707
2023-08-15 09:34:16 -04:00
Brad King
24cc66af21 Merge topic 'FindJNI-no-xcode' into release-3.27
597139b853 FindJNI: Restore support for macOS without Xcode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8707
2023-08-15 09:34:15 -04:00