Commit Graph

10003 Commits

Author SHA1 Message Date
Brad King
d811d86fd7 FileAPI: Add "configureLog" object kind
Provide clients with a way to get a known set of configure log event
versions.

Issue: #23200
2022-12-17 08:52:04 -05:00
Brad King
02599da236 Merge topic 'cxxmodules-clang-update'
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
2022-12-17 08:47:31 -05:00
Brad King
a1b71112d1 Merge topic 'configure-log'
6c40e0b25e ConfigureLog: Version individual events instead of the whole log
048a02d5bb ConfigureLog: Log try_compile and try_run checks
746c776caf ConfigureLog: Add infrastructure for structured configure event logging
e8b8d82cbf Tests: Generalize RunCMake expectation component names
8d29a0bda6 cmTryRunCommand: Factor out stdout/stderr capture conditions
fdda4095a3 cmCoreTryCompile: Return more semantic information from compile step

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8017
2022-12-17 08:44:50 -05:00
Brad King
6c40e0b25e ConfigureLog: Version individual events instead of the whole log
In order to support multiple log versions without buffering the
entire log, move versioning to the level of individual events.
Multiple versions of an event may then be logged consecutively.

Issue: #23200
2022-12-16 10:12:25 -05:00
Matthew Woehlke
048a02d5bb ConfigureLog: Log try_compile and try_run checks
Add configure log events for `try_compile` and `try_run` results.

Issue: #23200
2022-12-16 10:12:25 -05:00
Matthew Woehlke
746c776caf ConfigureLog: Add infrastructure for structured configure event logging
Add infrastructure for a "configure log".  Use YAML for a balance of
machine- and human-readability to records details of configure-time
events in a structured format.

Teach the RunCMake test framework to support matching the configure log.

Issue: #23200
2022-12-16 10:11:37 -05:00
Brad King
eec3aa11fc Merge topic 'genex-config-mapping-imported-targets'
e455265d72 Genex: Fix CONFIG on imported target with no explicit mapping

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8016
2022-12-16 09:04:49 -05:00
Luis Caro Campos
e455265d72 Genex: Fix CONFIG on imported target with no explicit mapping
When evaluating the `$<CONFIG>` genex on an imported target has the
`IMPORTED_CONFIGURATIONS` property set, the current project has a config
that does not match any of those, and no explicit configuration mappings
are defined, fall back to the same configuration as `IMPORTED_LOCATION`.

Fixes: #24222
2022-12-16 09:00:34 -05:00
Ben Boeckel
e84fcbcb0b cxxmodules: support new round of Clang patches
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.
2022-12-15 18:43:47 -05:00
Brad King
5f8e4de696 ASM_MARMASM: Populate MSVC debug information format abstraction table
In commit 3166547cf6 (ASM_MARMASM: Add support for Microsoft ARM
assembler language, 2022-10-14) we overlooked populating the runtime
library selection flags for the Microsoft ARM assembler, needed since
commit 0e96a20478 (MSVC: Add abstraction for debug information format,
2022-08-25, v3.25.0-rc1~142^2~1).  Its compiler id is `MSVC`, so our
generators expect the table to be populated.  It only supports
`Embedded` debug info.  Use empty flags for the other formats.

Without this fix, enabling the `ASM_MARMASM` language with policy
`CMP0141` set to `NEW` causes an error due to the missing table entries.

Issue: #24249
2022-12-15 14:04:54 -05:00
Brad King
f62a0f53bf Merge branch 'backport-masm-debug-format' into masm-debug-format 2022-12-15 11:55:09 -05:00
Brad King
98ba122a30 ASM_MASM: Populate MSVC debug information format abstraction table
In commit 0e96a20478 (MSVC: Add abstraction for debug information
format, 2022-08-25, v3.25.0-rc1~142^2~1) we overlooked populating the
runtime library selection flags for the Microsoft assembler.  Its
compiler id is `MSVC`, so our generators expect the table to be
populated.  It only supports `Embedded` debug info.  Use empty flags for
the other formats.

Without this fix, enabling the `ASM_MASM` language with policy `CMP0141`
set to `NEW` causes an error due to the missing table entries.

Fixes: #24249
2022-12-15 11:53:11 -05:00
Matthew Woehlke
e8b8d82cbf Tests: Generalize RunCMake expectation component names
Do not assume all the component names start in "std".

Co-authored-by: Brad King <brad.king@kitware.com>
2022-12-14 11:42:29 -05:00
Brad King
84c2518a7b Merge topic 'COMPILE_DEFINITIONS-property-cleanup'
7480fa0a5f COMPILE_DEFINITIONS property: ensure leading -D is removed in all cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8004
2022-12-14 09:03:08 -05:00
Marc Chevrier
7480fa0a5f COMPILE_DEFINITIONS property: ensure leading -D is removed in all cases
Fixes: #24186
2022-12-13 16:54:56 +01:00
Robert Maynard
d37d9c098c FindCUDAToolkit: Support the new nvJitLink library in CUDA 12 2022-12-12 13:28:50 -05:00
Brad King
d83b1dbac6 Merge topic 'file-make-directory-descriptive-errors'
efae1ab68b file(MAKE_DIRECTORY): Provide a more descriptive error message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8003
2022-12-09 07:57:22 -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
Terence Noone
efae1ab68b file(MAKE_DIRECTORY): Provide a more descriptive error message
Previously, MAKE_DIRECTORY would print `problem creating directory: {}`,
which was very unhelpful for debugging.  Extend the message with the
OS error string.
2022-12-08 07:54:55 -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
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
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
Robert Maynard
08aa516880 cmake: Stop parsing after -- when detecting script mode
Fixes #24220
2022-12-06 13:04:31 -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
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
Ben Boeckel
21b9fb1e8c cmCxxModuleMapper: support the clang module map format 2022-12-02 13:01:21 -05:00
Brad King
f8fed12250 Tests: Enable RunCMake.file-GET_RUNTIME_DEPENDENCIES linux cases on XL
These were excluded with the XL and XLClang compilers because one
such compiler in nightly testing hard-codes `--enable-new-dtags`.
Add a way to disable the cases via local configuration instead so that
we can run them on the rest of the XL compilers.
2022-12-02 09:09:38 -05:00
Brad King
7ea665b74d Merge topic 'file-GET_RUNTIME_DEPENDENCIES-transitive-rpath'
136622a2b2 file(GET_RUNTIME_DEPENDENCIES): propagate transitive parent's rpath
4aa3149c67 Tests: Simplify RunCMake.file-GET_RUNTIME_DEPENDENCIES case cleaning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7968
2022-12-02 09:01:51 -05:00
Alex Lapenkou
136622a2b2 file(GET_RUNTIME_DEPENDENCIES): propagate transitive parent's rpath
This fixes incorrect runtime dependency resolution when the dependency
is located in rpaths of a transitive parent.  Instead of supplying only
the rpaths of the immediate parent, it combines the rpaths of all
transitive parents and passes them down.

Fixes: #24172
2022-12-02 09:00:06 -05:00
Ben Boeckel
2991e92ea7 cmExperimental: recycle C++20 module support UUID
Visual Studio support warrants a new ID.
2022-12-01 11:42:46 -05:00
Ben Boeckel
388acfd46d Tests/RunCMake/CXXModules: add support for Visual Studio 2022-12-01 11:42:46 -05:00
Ben Boeckel
069a32b03c Tests/RunCMake/CXXModules: split out collation-requiring tests
Visual Studio does not currently have a place to insert the logic
required to implement this test, so skip it if possible.
2022-12-01 11:42:46 -05:00
Ben Boeckel
ef03a3a2f5 Tests/RunCMake/CXXModules: factor out generator support detection
This keeps the condition to a readable limit.
2022-12-01 11:42:46 -05:00
Ben Boeckel
736123464f Tests/RunCMake/CXXModules: update NoDyndepSupport for VS2019 and older 2022-12-01 11:42:46 -05:00
Ben Boeckel
4a4ce031cd Tests/RunCMake/CXXModules: catch VS circular error message 2022-12-01 08:33:43 -05:00
Ben Boeckel
7eb9b45861 Tests/RunCMake/CXXModules: mask scanning checks without control
In Visual Studio, there is no mechanism to tell scanning apart from
non-scanning, so skip the sanity checks.
2022-12-01 08:33:43 -05:00
Brad King
2a139018ce Merge topic 'find_cudatoolkit_avoid_nvhpc_symlinks'
9d012b1f69 FindCUDAToolkit: Ensure that paths provided have no symlinks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7974
2022-12-01 08:02:49 -05:00
Brad King
907402b147 Merge topic 'cmstrcat-move-first-arg'
beba50bd61 cmStrCat(): optimize when first argument is an rvalue string
d6f2a7ab4b cmStringCommand: remove use of cmCatViews()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7969
2022-12-01 07:58:05 -05:00
Robert Maynard
9d012b1f69 FindCUDAToolkit: Ensure that paths provided have no symlinks
Fixes: #24188
2022-11-30 16:39:00 -05:00
Brad King
e15d9f51db Merge topic 'fortran-regression'
a67da2ef66 Tests/FortranModules: add case for modules after "end interface X"
88fb1980c3 Fortran: Restore support for parsing "end interface X"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7966
2022-11-30 08:55:59 -05:00
Ben Boeckel
a67da2ef66 Tests/FortranModules: add case for modules after "end interface X"
When there is an `end interface X` in a file, subsequent modules should
not be considered part of interface X.

Issue: #24203
2022-11-30 06:39:48 -05:00
Kyle Edwards
beba50bd61 cmStrCat(): optimize when first argument is an rvalue string 2022-11-30 00:05:09 -05:00
Brad King
4aa3149c67 Tests: Simplify RunCMake.file-GET_RUNTIME_DEPENDENCIES case cleaning 2022-11-29 17:47:38 -05:00
Marc Chevrier
77d734aede FindPython: add support for Stable ABI
Fixes: #24141
2022-11-29 16:48:08 +01:00
Brad King
f72c405d4e Merge topic 'ci-nvhpc'
16a5c36795 gitlab-ci: add nightly job testing NVHPC with Ninja on Linux
9474d02386 Tests: Clarify CudaOnly.SeparateCompilationPTX output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7946
2022-11-29 10:39:40 -05:00
Brad King
f6b4923e95 Merge topic 'cuda_tests_support_linux_no_static_libs'
54d8044084 Tests: Don't presume that Linux CUDA Toolkits provide static libs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7949
2022-11-29 10:35:07 -05:00