48ee946fdc cmExperimental: recycle the C++ modules API UUID
1a1806a71b gitlab-ci: declare `bmionly` support for modules where possible
457a12f3f9 Tests/RunCMake/CXXModules: add tests which use modules from imported targets
9b9ec70b54 Ninja: generate scanning and build rules for C++20 module synthetic targets
80ef50a191 CXXModules: add a variable for BMI-only compilation
80d6544398 cxxmodules: generate synthetic targets as an initial pass
3dc6676ecc cmSyntheticTargetCache: add a struct for synthetic target caching
cb356b540c cmCxxModuleUsageEffects: add a class to capture module usage effects
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8535
Update the centos base image from centos 6 to centos 7. The latter is
the minimum version supported by libuv 1.45. The resulting binaries
require GLIBC 2.17.
Since commit 37e015d4a6 (Utilities/Sphinx: Refactor Sphinx reference
recording, 2023-03-08, v3.27.0-rc1~342^2~1) our documentation requires
Python 3.7 or higher. This is not available in the base images we use
to build Linux release binaries. These days our release packaging CI
pipeline builds the documentation in a separate job anyway.
Since Sphinx 5.2.0, the generated html search page reports all index
entries that match a query term. Unfortunately even non-main entries
get a high score, placing them before more important search results
such as document titles and domain object names.
Work around this for documentation published on `cmake.org` by removing
the logic from `searchtools.js` in the generated html documentation.
Issue: #25175
The Fedora `rocm-hip-devel` package organizes the `hip-lang` cmake package
differently from the official ROCm base images. Cover it separately.
Issue: #25050
The Debian package for `hipcc` organizes the `hip-lang` cmake package
differently from the official ROCm base images. Cover it separately.
Issue: #24562
`include-what-you-use` diagnostics, in practice, are specific to
the environment's compiler and standard library. Update includes
to satisfy IWYU for our CI job under Debian 12.
7b205b7078 ci: Build macOS 10.13+ package as C++17
7f6cebb1cd ci: Split macOS 10.10+ and 10.13+ package language standard selection
aab16d4bfc ci: Drop unnecessary -stdlib flag from macOS package
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8567
Take advantage of the standard library implementations of those C++17
features available when targeting macOS 10.13. Note that the standard
library `std::filesystem` implementation is not available until 10.15.
The job frequently fails during `ctest_build`, and the log shows
sccache: Compiler killed by signal 9
It does not compile much anyway, so disable sccache pending further
investigation.
The ISPC 1.20.0 release page on GitHub replaced existing macOS release
binaries with new ones. Update the hashes added by commit 44d13f50a2
(ci: Update to ISPC 1.20.0, 2023-05-09, v3.27.0-rc1~110^2).
Revert commit f24c6ae5b8 (ci: Add nlohmann-json to Fedora base image,
2023-05-17). The previously-upcoming dependency on nlohmann-json has
been replaced with our existing dependency on jsoncpp.
The `ccc-analyzer` compiler wrapper preprocesses differently
for clang-analyzer than for normal compilation. In particular,
the `__clang_analyzer__` preprocessor definition is added.
This does not interact well with `sccache` because it indexes based on
the compiler's normal preprocessing but stores results from the entire
`ccc-analyzer` invocation.
80181da866 Tests: Add option to control timeout of BootstrapTest
21df34b255 Tests: Modernize name of option to control existence of BootstrapTest
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8491
d38779df2a ci: Enable RunCMake.CXXModules collation cases in clang jobs
69e4525241 Tests/CXXModules: add example for private modules between targets
18f87c87f8 cmCxxModuleMapper: track whether modules are private or not
56f7d6f827 cmCxxModuleMapper: add a structure to represent BMI locations
8207a3a266 cmDyndepCollation: add a query for visibility of an object's modules
e8efcbec8c iwyu: ignore `std::remove_reference` requirements
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8476
Since commit 069a32b03c (Tests/RunCMake/CXXModules: split out
collation-requiring tests, 2022-11-28, v3.26.0-rc1~243^2~4)
these cases require explicit configuration.
VS 17.6 now implements `ScanSourceforModuleDependencies` using the same
`cl /scanDependencies` scanner that our Ninja generator uses. It can
distinguish module internal partitions from module interface units based
on their content. Switch from `CompileAsCppModule` to `CompileAsCpp`
for `CXX_MODULES` sources so that MSBuild can scan and classify them.
Since commit 703f39354e (ci: add clang-tidy development headers to
Fedora base image, 2022-08-31, v3.25.0-rc1~215^2), Fedora has added the
`clang-tools-extra-devel` package.
On Linux and macOS we use the "before script" for both build and test
jobs. On Windows we only want a subset of it, but give it a dedicated
helper for consistency.
In Fedora's HDF5 packages for OpenMPI and MPICH, the `h5pfc` compiler
wrappers for Fortran use the wrong search path for their Fortran
modules. Patch them locally in CI jobs until it is fixed in Fedora
upstream.
3fe8e33f27 Clang: Record Clang 16.0 flags for our experimental C++ modules support
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !8285
These artifacts need to be manually signed before distribution.
Move them to a dedicated `unsigned/` directory to avoid accidental
distribution without signing.
In commit 4c7c66dcf5 (gitlab-ci: Add jobs to make Windows x86_64 and
i386 packages, 2022-05-19, v3.24.0-rc1~112^2) we used a separate Windows
packaging job in nightly packaging pipelines. It did not run in release
pipelines, where we need to run the final packaging step manually with
signing. Simplify nightly packaging pipelines by running `cpack` at the
end of the build job as we do for other platforms.
For release packaging pipelines, create an archive of the files needed
to build a package, and present this as the built "package" on Windows.
Populate issue descriptions by default with a note directing reporters
to other resources they should consider using first. Make it a comment
so that the content does not actually render in the report not removed.
P1689 support has been merged in Clang trunk and Clang 16 branch, so we
are now able to use the finalized clang-scan-deps command line options.
See also llvm-project's clang/test/ClangScanDeps/P1689.cppm [1] for the
samples of clang-scan-deps usages.
[1] https://github.com/llvm/llvm-project/blob/6d859df46e/clang/test/ClangScanDeps/P1689.cppm
Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
3350c17451 ci: Enable file(DOWNLOAD) TLS_VERIFY test case in CI jobs
17b47da3d8 Tests: Add test for file(DOWNLOAD) with TLS_VERIFY
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8194
6789af36bf Help: Fix broken links found by `linkcheck`
8f4bd3bf7e ci: Check for broken links when build HTML manual
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8177
Apply the approach from commit 354fdf2116 (ci: Reduce intermediate
docker layers and final image size, 2023-02-01) to more stages.
Also:
* Use cache (prefetch metadata and packages) to reduce network I/O
and speedup image build.
* Use `tmpfs` to drop logs produced by the package manager.
Instead of requiring setting up a mock CI environment with the official
image locally. While such docs would be handy anyways, requiring that
entire setup to get a small piece of information from a build is
unnecessary.
bf3425c3d2 ci: add a comment to run IWYU in verbose mode
25f0b4f397 CMake: add an option to run IWYU in verbose mode
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8130
- With this change we can use e.g. ImageMagick::Magick++ directly
in targt_link_libraries.
- This change also adds CFLAGS which was missing before.
- Also adds example on how to use the targets.
5dc17d0a7a gitlab-ci: update to new Clang CI image for C++ modules
e84fcbcb0b cxxmodules: support new round of Clang patches
5e35913382 ci: update `llvm` snapshot to newest patch revisions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8019
These patches now support the `-MF` output, so remove the `none` support
added just for the old patchset which did not use it.
Also update the flag name to `-fmodule-output=`.
Due to the new Clang module mapper flag, use a new experimental support
UUID as well.
Some package managers provide a minimal set of static libraries,
which historically has caused problems for FindCUDAToolkit.
Resolve this issue by creating a CUDA image with only the minimal
set of static libraries.
2c558cfd1b gitlab-ci: add CI jobs for Clang with C++20 modules
abd42e9cfc ci: add a Docker container for clang support of C++20 modules
51093f3002 Clang-FindBinUtils: also find `clang-scan-deps`
0b333de923 ci: add C++ module rules file for Clang
21b9fb1e8c cmCxxModuleMapper: support the `clang` module map format
9c66224668 cmNinjaTargetGenerator: skip setting `depfile` for `none` scantypes
9123a0991f cmNinjaTargetGenerator: use `.clear()` to empty out some strings
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Cristian Adam <cristian.adam@gmail.com>
Merge-request: !7978
The pre-build step will allow actions to be executed before the
CMake build but after Ninja and sccache have been downloaded, so
they can be used in the pre-build step. The env step is meant for
setting up environment variables anyway, rather than performing
actions.
The post-build step will allow extra artifacts to be computed after
the build is complete.
The job added by commit 16a5c36795 (gitlab-ci: add nightly job testing
NVHPC with Ninja on Linux, 2022-11-21) started failing after CI hosts
were updated from NVIDIA driver version 520 to version 525. Somehow
this causes the NVHPC multi-cuda `nvcc` wrapper to select CUDA 10.2
instead of 11.7 as with older driver versions.
As a workaround, add the preferred version of `nvcc` to the PATH.
Issue: #24225
6a38c5dccb gitlab-ci: replace 'linux' tags with 'linux-x86_64' in upload jobs
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !7976
We already have `t:debian10-{makefiles,ninja}-clang` jobs covering old
versions of Clang with Makefile and Ninja generators. Complement them
with new `t:fedora37-{makefiles,ninja}-clang` jobs covering recent
versions of Clang.
Fedora 37 now packages LLVMFlang, so enable Fortran tests with that
compiler too.
Issue: #22387
09c1b1db07 gitlab-ci: Add windows-arm64 native jobs for Ninja and VS
61ebd7d083 ci: Download cmake on windows-arm64
93a5d89b42 ci: Teach cmake download script on Windows to branch on host architecture
1ccffcf0ea ci: Factor out helper to load python into environment on Windows
781303c0e2 ci: Factor out helper to load qt into environment on Windows
b0d16c7f74 Tests: Fix CTest.UpdateGIT under repo-local defaultBranch config
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !7905
0e9782b336 msvc: bless MSVC 19.34 support for C++ modules as experimental
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7745
46b2849550 ci: Update LLVM/Clang to 15.0 in nightly CI jobs on Windows
3eb94e4d51 ci: Simplify LLVM/Clang CI job specs on Windows
8ba5835c8d ci: Factor out helper to load clang into environment on Windows
bf2e4a2e85 ci: Factor out helper to load ninja into environment on Windows
93ff726114 Tests: Fix TryCompile bad source case for clang-cl 15 on Windows
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7897
Problems with `cmake-gui` when compiled with the MSVC 14.33 toolset,
that did not occur with the MSVC 14.32 toolset, no longer occur with the
MSVC 14.34 toolset. Revert commit cb8b27a901 (gitlab-ci: Use separate
MSVC toolset specification for packaging jobs, 2022-08-18, v3.24.2~24^2~1)
and update the remaining toolset version references.
Fixes: #23859
0d3d687067 gitlab-ci: update macOS jobs to use Xcode 14.1
9684a589ca Source: Replace uses of sprintf with safer snprintf in CMake 3.24 branch
eea23d21a3 Source: Tell Git not to check whitespace in third-party curses form code
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7863
0d3d687067 gitlab-ci: update macOS jobs to use Xcode 14.1
9684a589ca Source: Replace uses of sprintf with safer snprintf in CMake 3.24 branch
eea23d21a3 Source: Tell Git not to check whitespace in third-party curses form code
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7863
9cdf4c9be4 gitlab-ci: update macOS jobs to use Xcode 14.0
5d2c2b2558 Tests: Update RunCMake.XcodeProject iOS cases for Xcode 14.0
12c6fec6b4 Xcode: Drop CMAKE_INTDIR= definition in Swift targets
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7732
Revert commit 0ac9ec47f6 (ci: add clang-tidy to Debian x86_64 base
image, 2022-09-20). Our clang-tidy job runs under Fedora, and we need
the plugin to compile there anyway, so lints like IWYU will best be done
in the Fedora image.
Issue: #23912
Load env scripts with `.` sourcing instead of `Invoke-Expression`.
This allows powershell variables to persist, much like bash.
Leave helper script loading unchanged, as those scripts may set
powershell variables that we do not want to persist.
Since commit b87645b6a5 (gitlab-ci: Update non-packaging Windows builds
to MSVC 14.33 toolset, 2022-08-18), the version of MSVC used in CI test
jobs supports the `cl -scanDependencies` functionality we need to
support C++ modules. Enable the corresponding tests.
b87645b6a5 gitlab-ci: Update non-packaging Windows builds to MSVC 14.33 toolset
cb8b27a901 gitlab-ci: Use separate MSVC toolset specification for packaging jobs
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7597
Restore the change from commit 6f17996edc (gitlab-ci: Update Windows
builds to MSVC 14.33 toolset, 2022-08-15, v3.24.1~3^2), but not for
packaging jobs. `cmake-gui` is still buggy when compiled with
the newer toolset.
Issue: #23859
b55152e7ad gitlab-ci: add jobs to test CMake with external dependencies on Linux
6a05d107ca ci: add CMake external build dependencies to Debian and Fedora base images
d3c1b8a491 jsoncpp: Require version 1.6.0 when using system-provided library
68d3ca7008 Tests: Fix RunCMake.FileAPI test with jsoncpp < 1.7.5
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7592
Revert commit 6f17996edc (gitlab-ci: Update Windows builds to MSVC 14.33
toolset, 2022-08-15). A `cmake-gui` built with the MSVC 14.33 toolset
emits spurious errors when configuring CMake projects, even when the
adjacent `cmake` binary succeeds reliably. Revert to the known-working
MSVC 14.32 toolset pending further investigation.
Issue: #23859
4f95e6b284 ci: test BMI exporting and installation with GCC in CI
c49d5f137b RunCMake/CXXModules: add a "deep-chain" test
297e0f4dce cmCxxModuleMapper: support MSVC module map format
b3c2880cb2 cmCxxModuleMapper: track transitive modules for MSVC
a43713d615 CTestCustom: ignore `cm::optional` uninitialized memory false positive
b90de0b492 RunCMake/CXXModules: support MSVC extensions
a84c186a7d cmScanDepFormat: support the MSVC 17.3 toolchain temporarily
d7f5064ff7 cmScanDepFormat: support P1689R5
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7481
Since commit 06c6e76a12 (ci: update to WiX 3.14.0.6526, 2022-06-10,
v3.24.0-rc1~4^2~2) we download the WiX binaries from `wixtoolset.org`
instead of a `github.com` CDN. Avoid hitting their organization site
on every CI job by hosting the binaries at `cmake.org`.
5db79b5cd3 gitlab-ci: update to an image with git installed
3e1ace7f46 ci: add git to the CI image
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7398
07bc3b07ec gitlab-ci: test C++ modules using GCC
1b2270aa4e ci: add a Docker image to test out C++ modules with GCC
8c5a53096a Tests/RunCMake/CXXModules: add module-using examples
4151547e2f cmGlobalNinjaGenerator: use `cmModuleMapper` implementation
b43bdaff3c cmCxxModuleMapper: implement support for GCC's module map format
02d0f0e752 cmCxxModuleMapper: add source to handle module mapper contents
a046a45aad cmGlobalNinjaGenerator: add a TODO for header units
386465bf83 cmTarget: add support for C++ module fileset types
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7369
In commit 7a21173b0e (gitlab-ci: Add job to build Windows arm64
binaries, 2022-06-13, v3.24.0-rc1~4^2~1) we built the Qt binaries using
the MSVC 14.32 toolset targeting arm64. However, the `cmake-gui` built
with them does not start, perhaps due to a bug in MSVC's ARM64 support.
Run the `Utilities/Release/win/qtbase-6.3.0-win-msvc.cmake` script for
`i386` and `x86_64`. Run it for `arm64` with the `clang-cl` argument.
Issue: #21902
Base it on the approach from commit 4c7c66dcf5 (gitlab-ci: Add jobs to
make Windows x86_64 and i386 packages, 2022-05-19). Leave out the
packaging and upload steps for now because they are only for the nightly
binaries, and will need a new release of CPack to pass the `arm64`
architecture to WiX.
Issue: #21902