Commit Graph

60333 Commits

Author SHA1 Message Date
Brad King 1652616f95 Merge topic 'doc-add_custom_command'
303c48fbd4 Help: Add add_custom_command example with output consumed by multiple targets
5f2bf6ecc6 Help: Drop misleading add_custom_command "makefile terms" explanation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Rejected-by: BRevzin <barry.revzin@gmail.com>
Merge-request: !8002
2022-12-09 07:53:08 -05:00
Kitware Robot d1b9e03b79 CMake Nightly Date Stamp 2022-12-09 00:01:18 -05:00
Brad King 303c48fbd4 Help: Add add_custom_command example with output consumed by multiple targets
This is a common use case, so add an example demonstrating it.
2022-12-08 15:12:32 -05:00
Brad King 986fce1fa7 Merge topic 'vs-version-var'
5ce0f03cce VS: Add a variable to report the Visual Studio version build number
55529c5e93 Help: Factor out VS Build Number components document fragment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8000
2022-12-08 08:03:20 -05:00
Brad King 239beca1e3 Merge topic 'test-FindBoost-no-system'
8b9c9e7e27 Tests: Teach RunCMake.FindBoost to avoid finding an external Boost

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7997
2022-12-08 08:00:07 -05:00
Brad King 9fc3d5905f Merge topic 'ci-cuda'
ae610be60f gitlab-ci: de-duplicate cuda job settings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7998
2022-12-08 07:59:29 -05:00
Brad King 2223155d70 Merge branch 'release-3.25' 2022-12-08 07:58:08 -05:00
Brad King d5d4c698e9 Merge topic 'ccmake-aix-curses'
d91d9ec431 ccmake: Restore compilation with AIX curses.h

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8001
2022-12-08 07:58:07 -05:00
Brad King 6db3519c41 Merge topic 'ccmake-aix-curses' into release-3.25
d91d9ec431 ccmake: Restore compilation with AIX curses.h

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8001
2022-12-08 07:58:06 -05:00
Kitware Robot 51f5ed0a7a CMake Nightly Date Stamp 2022-12-08 00:01:11 -05:00
Brad King 5f2bf6ecc6 Help: Drop misleading add_custom_command "makefile terms" explanation
The "In makefile terms" explanation is left from very early days of
CMake to help developers migrating from hand-written makefiles.
These days it is often misinterpreted, particularly in the context
of multiple `add_custom_command` calls, to mean that we generate a
single Makefile containing rules for all custom commands.  This
leads to an incorrect mental model of the expressed build system.
The actual generated build system may spread the rules across multiple
targets that do not see the each other's file-level rules, which makes
target-level dependencies important too.
2022-12-07 18:39:37 -05:00
Brad King d91d9ec431 ccmake: Restore compilation with AIX curses.h
On AIX, including `<curses.h>` includes `<term.h>` which defines
a bunch of non-prefixed, lower-case macro names.  Undefine one
that conflicts with our source code.

Fixes: #24229
2022-12-07 17:57:28 -05:00
Brad King 5ce0f03cce VS: Add a variable to report the Visual Studio version build number
VS 2017 and above come with a Visual Studio Installer tool that tracks
four-component Visual Studio version numbers.  We already detect the VS
version number because it is needed to make some generation decisions.
Provide the number to projects in a `CMAKE_VS_VERSION_BUILD_NUMBER`
variable so they can use it similarly.

Fixes: #24230
2022-12-07 17:49:04 -05:00
Brad King 55529c5e93 Help: Factor out VS Build Number components document fragment 2022-12-07 17:46:07 -05:00
Brad King ae610be60f gitlab-ci: de-duplicate cuda job settings 2022-12-07 09:41:04 -05:00
Brad King 8b9c9e7e27 Tests: Teach RunCMake.FindBoost to avoid finding an external Boost
The `ConfigModeNotFound` case does not expect to find a Boost.
Avoid accidentally finding one on the host.
2022-12-07 08:21:39 -05:00
Brad King 127fa54808 Merge topic 'vs-dotnet-sdk-xaml-resx'
c445dd2797 VS: Add Xaml and Resx files to .Net SDK style projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7991
2022-12-07 08:20:46 -05:00
Brad King 3b4337adc7 Merge topic 'clang-tidy-export-fixes-dir'
232467eb1c clang-tidy: add <LANG>_CLANG_TIDY_EXPORT_FIXES_DIR property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7982
2022-12-07 08:19:53 -05:00
Brad King 6bae244ad2 Merge topic 'cmstrcat-any-rvalue-arg'
1cca051470 cmStrCat(): allow any argument to be an rvalue string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !7993
2022-12-07 08:19:08 -05:00
Brad King e544f2427d Merge topic 'stop_parsing_after_first_script_arg'
08aa516880 cmake: Stop parsing after `--` when detecting script mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7992
2022-12-07 08:17:14 -05:00
Brad King 602c24f778 Merge topic 'ci-nvhpc'
12d032b265 gitlab-ci: Update NVHPC to version 22.11

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7994
2022-12-07 08:15:13 -05:00
Brad King 5f94655808 Merge topic 'ci-cuda-no-static'
004f954401 ci: Add job to test minimal CUDA install (no static libs)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7996
2022-12-07 08:13:48 -05:00
Brad King 3be32a73cc Merge branch 'release-3.25' 2022-12-07 08:12:05 -05:00
Brad King 14824129d9 Merge topic 'doc-SYSTEM'
b15b9cf286 Help: Clarify SYSTEM property default for imported targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7990
2022-12-07 08:12:05 -05:00
Brad King 8bf724f756 Merge topic 'doc-SYSTEM' into release-3.25
b15b9cf286 Help: Clarify SYSTEM property default for imported targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7990
2022-12-07 08:12:04 -05:00
Kitware Robot 68f8a01802 CMake Nightly Date Stamp 2022-12-07 00:01:10 -05:00
Robert Maynard 004f954401 ci: Add job to test minimal CUDA install (no static libs)
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.
2022-12-06 15:44:33 -05:00
Brad King 2c3eec6a9c Merge branch 'release-3.25' 2022-12-06 13:55:50 -05:00
Brad King 650fab3f39 Merge topic 'ci-os-arch'
c922722ec0 Merge branch 'backport-ci-os-arch' into ci-os-arch
2bf1ce6cc3 gitlab-ci: drop unnecessary linux kernel version tag on 3.25 release branch
429574a94e gitlab-ci: replace '$os' tags with '$os-x86_64' on 3.25 release branch

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7995
2022-12-06 13:55:50 -05:00
Brad King 4d07327c7c Merge topic 'ci-os-arch' into release-3.25
2bf1ce6cc3 gitlab-ci: drop unnecessary linux kernel version tag on 3.25 release branch
429574a94e gitlab-ci: replace '$os' tags with '$os-x86_64' on 3.25 release branch

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7995
2022-12-06 13:55:49 -05:00
Kyle Edwards 1cca051470 cmStrCat(): allow any argument to be an rvalue string
This will allow us to re-use any rvalue allocation that is
available, not just from the first argument.
2022-12-06 13:54:42 -05:00
Brad King c922722ec0 Merge branch 'backport-ci-os-arch' into ci-os-arch 2022-12-06 13:29:56 -05:00
Brad King 2bf1ce6cc3 gitlab-ci: drop unnecessary linux kernel version tag on 3.25 release branch
All our CI hosts now have Linux kernel version 3.17 or higher,
so we no longer need a dedicated tag.

This backports commit c212c7dc8b (gitlab-ci: drop unnecessary linux
kernel version tag, 2022-11-30) to the 3.25 release branch.
2022-12-06 13:27:39 -05:00
Brad King 429574a94e gitlab-ci: replace '$os' tags with '$os-x86_64' on 3.25 release branch
The latter tags are now available on our CI runners to more explicitly
distinguish `linux-x86_64` from `linux-aarch64` and to distinguish
`{macos,windows}-x86_64` from `{macos,windows}-arm64`.

This backports commit 33fe37a660 (gitlab-ci: replace '{macos,windows}'
tags with '{macos,windows}-x86_64', 2022-11-30) and commit 94d82d91d5
(gitlab-ci: replace 'linux' tags with 'linux-x86_64', 2022-11-30) to
the 3.25 release branch.
2022-12-06 13:24:07 -05:00
Robert Maynard 08aa516880 cmake: Stop parsing after -- when detecting script mode
Fixes #24220
2022-12-06 13:04:31 -05:00
Brad King 12d032b265 gitlab-ci: Update NVHPC to version 22.11
Fixes: #24225
2022-12-06 10:59:24 -05:00
Kyle Edwards 232467eb1c clang-tidy: add <LANG>_CLANG_TIDY_EXPORT_FIXES_DIR property
Fixes: #21362
2022-12-06 10:39:29 -05:00
Quentin Berthet c445dd2797 VS: Add Xaml and Resx files to .Net SDK style projects
Improve parity with classic MSBuild projects.

Fixes: #23415
2022-12-06 15:42:23 +01:00
Brad King aeac9b4660 Merge topic 'automoc-case-change'
318ec07560 automoc: Remove existing output file before invoking moc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7985
2022-12-06 08:10:03 -05:00
Brad King 6f619d2de6 Merge topic 'ci-pre-build-post-build'
a7be3c961f ci: build clang-tidy plugin in pre-build step
372ce5bffe ci: add pre-build and post-build steps to Linux

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7989
2022-12-06 08:09:07 -05:00
Brad King 2f5acfa801 Merge topic 'ci-nvhpc'
7d2979d6eb gitlab-ci: Select CUDA version explicitly in NVHPC job

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7987
2022-12-06 08:08:00 -05:00
Brad King e094bff983 Merge topic 'FindOpenSSL-static-z'
1b7804edd0 FindOpenSSL: use extra dependencies from pkg-config as well

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7986
2022-12-06 08:05:53 -05:00
Brad King f1f064b7b2 Merge topic 'cxx-module-map-clang'
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
2022-12-06 08:04:18 -05:00
Kitware Robot 85d89ca885 CMake Nightly Date Stamp 2022-12-06 00:01:09 -05:00
Brad King b15b9cf286 Help: Clarify SYSTEM property default for imported targets
The `SYSTEM` directory property does not affect imported targets.

Fixes: #24219
2022-12-05 19:42:06 -05:00
Kyle Edwards a7be3c961f ci: build clang-tidy plugin in pre-build step
And use sccache and Ninja.
2022-12-05 17:43:35 -05:00
Kyle Edwards 372ce5bffe ci: add pre-build and post-build steps to Linux
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.
2022-12-05 17:43:31 -05:00
Brad King 7d2979d6eb gitlab-ci: Select CUDA version explicitly in NVHPC job
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
2022-12-05 13:17:39 -05:00
Brad King e0a35098bb Merge topic 'ArgumentFlags-function-args'
466f9b886d cmTargetPropCommandBase::HandleArguments: flags must be OR'able

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7983
2022-12-05 12:58:57 -05:00
Brad King 7006ca9190 Merge topic 'find_library-arch-unknown'
e7f78309e7 find_library: Construct paths by removing 'unknown' from library arch

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7921
2022-12-05 12:57:11 -05:00