Commit Graph

10641 Commits

Author SHA1 Message Date
Brad King
37c80628ba Merge topic 'ctest-timeout-flag'
d267c128a2 ctest: Restore support for --timeout values higher than default test timeout
dd779a4bc2 Tests: Clarify RunCMake.CTestTimeout case name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8851
2023-10-02 08:57:36 -04:00
Brad King
af149fbcaa Merge topic 'FindCUDAToolkit-implicit-dirs'
4316d4dcfd FindCUDAToolkit: Search all of `nvcc` implicit includes and library dirs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8835
2023-09-29 09:37:30 -04:00
Brad King
b3205afcde Merge topic 'help-arbitrary'
4e50320978 Help: Allow help for arbitrary keywords

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8674
2023-09-29 09:36:24 -04:00
Brad King
d267c128a2 ctest: Restore support for --timeout values higher than default test timeout
Since refactoring in commit 0a5aeaf302 (cmCTestRunTest: Consolidate test
timeout selection logic, 2023-05-04, v3.27.0-rc1~120^2) we accidentally
truncate `--timeout` values to ctest's default `TimeOut`.  Fix the
logic to prefer the flag whenever the `TIMEOUT` property is not set.

In combination with the prior refactoring, this also fixes a bug that
caused `--timeout` values of 10000000 seconds or more to be ignored.

Fixes: #23979
2023-09-29 09:25:01 -04:00
Brad King
dd779a4bc2 Tests: Clarify RunCMake.CTestTimeout case name 2023-09-29 08:58:15 -04:00
Martin Duffy
4e50320978 Help: Allow help for arbitrary keywords
Changes `cmake --help [arg]` to search `Help/*/` instead of `Help/command/`
Allows editors to easily display manual for `<cword>`
2023-09-27 18:01:12 -04:00
Robert Maynard
4316d4dcfd FindCUDAToolkit: Search all of nvcc implicit includes and library dirs
Improves the handling of CUDA layouts where we have multiple include
and library directories listed in the output of `nvcc -v`. This
updates both when the CUDA language is enabled or not.

Fixes: #24915
2023-09-27 13:28:52 -04:00
Brad King
6bb05172ac Merge topic 'cxxmodules-export-dirs-with-prefix'
42654cc818 Tests/CXXModules: add tests for modules with include requirements
7217cb78cf Tests/CXXModules: relax line number matching in stderr
b3d1bbbbcc cmExportFileGenerator: relocate include directories for C++ modules
349ff8b080 cmGeneratorTarget: remove not-INTERFACE assertion
681a763425 cmGeneratorTarget: use a character literal

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8838
2023-09-27 11:25:22 -04:00
Brad King
2a12a83037 Merge topic 'misc-cxxmodule-fixes'
3b632f32fa Tests/CXXModules: forward the default build type
5ab6b09691 Tests/CXXModules: fix multi-config and MSVC details
11b62ef118 Tests/CXXModules: add missing `bmi-only` and compiler id fields
5d9631fbdd Tests/CXXModules: fix key set mismatch error messages
86e7fb72cb Tests/CXXModules: use a less generic name for the config
6b940dc590 Tests/CXXModules: replace the object extension as well
1c9f83c8ec Tests/CXXModules: fix error detection propagation
7a4c02cb38 cmGlobalGenerator: factor out messaging for CMP0037
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Merge-request: !8834
2023-09-27 11:22:05 -04:00
Brad King
81d863b60a Merge topic 'autogen-timestamp-per-config'
bac468ddfd AutoGen: Fix regression in timestamps on multi-config generators
c3f0825d3c Tests/RunCMake/Autogen: Factor out test setup
9654835b4f Tests/RunCMake/Autogen: Add expect_n_times() function

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8840
2023-09-27 11:21:07 -04:00
Ben Boeckel
42654cc818 Tests/CXXModules: add tests for modules with include requirements 2023-09-26 14:42:54 -04:00
Ben Boeckel
7217cb78cf Tests/CXXModules: relax line number matching in stderr 2023-09-26 14:42:47 -04:00
Orkun Tokdemir
bac468ddfd AutoGen: Fix regression in timestamps on multi-config generators
Since commit fddd0f0443 (Autogen: AUTO*_EXECUTABLE: add support for
per-config values, 2023-06-14) we do not correctly generate outputs
for one configuration after another configuration has been built.
Fix this:

- Revert some config based stuff for `Xcode` due to the `$<CONFIG>`
  genex usage limitation in source files with `Xcode`.
- For multi-config generators use a per-config `timestamp_$<CONFIG>`
  file instead of one `timestamp` file.

Fixes: #25261
2023-09-26 11:54:26 -04:00
Orkun Tokdemir
c3f0825d3c Tests/RunCMake/Autogen: Factor out test setup 2023-09-26 11:54:16 -04:00
Orkun Tokdemir
9654835b4f Tests/RunCMake/Autogen: Add expect_n_times() function 2023-09-26 11:54:09 -04:00
Brad King
9ba1883ea6 Tests: Fix RunCMake.XcFramework in symlinked paths with Xcode 15
The `xcodebuild -create-xcframework` tool in Xcode 15.0 fails to
compute relative paths if the input paths have symlinks.
2023-09-26 11:10:16 -04:00
Ben Boeckel
3b632f32fa Tests/CXXModules: forward the default build type
Windows defaults the build type to `Debug` while other platforms have an
empty string.
2023-09-26 10:40:09 -04:00
Brad King
84a1e529ee Tests: Fix failures on macOS arm64 due to Xcode 15 skipping ad-hoc signature
Update commit 1c15eb39d2 (Tests: Suppress failures on macOS arm64 due to
separate Xcode signing phase, 2021-02-22, v3.20.0-rc2~11^2) for Xcode 15,
which ignores our `-Xlinker -adhoc_codesign` flag, prioritizes its own
`-Xlinker -no_adhoc_codesign` flag, and does not add an ad-hoc signature
at link time.

Issue: #21845
2023-09-26 10:04:08 -04:00
Brad King
cc5d6134ad Tests: Disable visionOS cases because Xcode 15.0 excludes support
In commit 25977e177b (apple: add preliminary visionOS support, 2023-06-22)
we added visionOS based on a Xcode 15 beta version, but the Xcode 15.0
final release did not include it.  Disable the test cases until we can
improve the condition to detect availability.

Issue: #25266
2023-09-26 10:04:08 -04:00
Brad King
f9f5751d18 Tests: Clarify RunCMake.XcFramework conditions testing Xcode version
In commit 7050ac56a1 (macOS: Add support for linking against .xcframework
folders, 2023-05-17) used conditions based on the AppleClang compiler
version, but we actually want to check the Xcode version.
2023-09-26 10:04:07 -04:00
Brad King
e0765c2c46 Tests: Teach RunCMake to ignore Xcode DVTAssertions warnings
On some Xcode versions, `xcodebuild` may warn:

    ... xcodebuild[...] DVTAssertions: Warning ...

Teach RunCMake to drop such incidental lines before matching against
expected output.
2023-09-26 10:04:07 -04:00
Brad King
5a79ea2799 Merge topic 'cuda_handle_target_objects_in_device_link'
cd984261e1 CUDA: Device linking now uses TARGET_OBJECTS content
aa8facefe8 CUDA: Visual Studio propagate objects to device linking

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8829
2023-09-26 09:42:42 -04:00
Brad King
5d32320bf3 Merge topic 'hip-nvidia'
fd982eec10 HIP: Add tests for special NVIDIA values of CMAKE_HIP_ARCHITECTURES
8c8b3f1bfa HIP: Fix support for -DCMAKE_HIP_ARCHITECTURES=native with NVCC
b3e92775ab HIP: Add CMAKE_HIP_HOST_COMPILER when compiler is NVCC
e43918b4ca HIP: Fix linking mixed-lang binary with CXX compiler and Makefile generators
4794505122 HIP: Do not require hip-lang package for NVIDIA platform
09d759dc7f HIP: Simplify exclusion of AMD device runtime with NVIDIA GPUs
2a60663670 HIP: Simplify CMAKE_GENERATOR references for determining compiler
8124950f6c CUDA: Generalize CMAKE_{CUDA => <LANG>}_HOST_COMPILER variable docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8836
2023-09-26 09:40:25 -04:00
Brad King
b8151299de Merge topic 'genexp-no-eval'
634079b86d cmGeneratorExpressionEvaluator: Short-circuit boolean operators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Merge-request: !8791
2023-09-26 09:31:42 -04:00
Brad King
7831781155 Merge topic 'lint-genex-empty'
80df7b1745 Linting: Fix empty evaluated genex

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8833
2023-09-26 09:30:10 -04:00
Brad King
0be496cb5a Merge topic 'orangec-compiler'
f8fa4f1ad7 ci: Add OrangeC 6.73.1 nightly CI job
531b4fe643 OrangeC: Add support for OrangeC compiler
10f435a58f Tests: Simplify nested if conditions in Complex tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Victor <lostfreeman@gmail.com>
Merge-request: !8592
2023-09-26 09:23:10 -04:00
Craig Scott
8a90ae92af Merge topic 'FetchContent-EXCLUDE_FROM_ALL'
5f77807f1c FetchContent: Add support for EXCLUDE_FROM_ALL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8822
2023-09-26 08:35:45 -04:00
Steven Stallion
5f77807f1c FetchContent: Add support for EXCLUDE_FROM_ALL
Fixes: #20167
2023-09-26 08:56:44 +10:00
Ben Boeckel
5ab6b09691 Tests/CXXModules: fix multi-config and MSVC details 2023-09-25 18:19:42 -04:00
Ben Boeckel
11b62ef118 Tests/CXXModules: add missing bmi-only and compiler id fields
Missed because the test script did not properly bubble up error reports.
2023-09-25 18:14:53 -04:00
Ben Boeckel
5d9631fbdd Tests/CXXModules: fix key set mismatch error messages 2023-09-25 18:14:53 -04:00
Ben Boeckel
86e7fb72cb Tests/CXXModules: use a less generic name for the config 2023-09-25 18:14:53 -04:00
Ben Boeckel
6b940dc590 Tests/CXXModules: replace the object extension as well 2023-09-25 18:14:53 -04:00
Ben Boeckel
1c9f83c8ec Tests/CXXModules: fix error detection propagation 2023-09-25 17:39:35 -04:00
Brad King
fd982eec10 HIP: Add tests for special NVIDIA values of CMAKE_HIP_ARCHITECTURES 2023-09-25 16:23:00 -04:00
Brad King
b3e92775ab HIP: Add CMAKE_HIP_HOST_COMPILER when compiler is NVCC
Also add `HIPHOSTCXX` environment variable.
2023-09-25 16:11:18 -04:00
Brad King
e43918b4ca HIP: Fix linking mixed-lang binary with CXX compiler and Makefile generators
Following commit 6377a43814 (CUDA: Support response files with nvcc,
2022-06-01, v3.25.0-rc1~636^2), while determining the compiler ABI, do
not use response files, so that we can extract implicit link flags.

Fixes: #25272
2023-09-25 16:06:36 -04:00
David Lindauer
531b4fe643 OrangeC: Add support for OrangeC compiler
Add compiler information modules.  Update the test suite.

Fixes: #25032
Co-authored-by: Brad King <brad.king@kitware.com>
2023-09-25 12:27:29 -04:00
Brad King
10f435a58f Tests: Simplify nested if conditions in Complex tests 2023-09-25 11:08:21 -04:00
Orkun Tokdemir
80df7b1745 Linting: Fix empty evaluated genex
Update logic added by commit 099934e313 (Add generator expression
support to static code analysis hooks, 2023-03-24, v3.27.0-rc1~261^2),
and preserved by commit 993dde925f (TargetGenerator: Factor out
generation of code check rules, 2023-05-12, v3.27.0-rc1~84^2~2), to
handle a generator expression that evaluates to the empty string.

If `<LANG>_CPPCHECK`, `<LANG>_CPPLINT`, `<LANG>_CLANG_TIDY`, or
`<LANG>_INCLUDE_WHAT_YOU_USE` are empty after evaluating generator
expressions, do not run their lints.

Fixes: #25265
2023-09-25 09:16:33 -04:00
Brad King
89d155e1bb Merge topic 'CrayClang-compiler'
80838316a8 CrayClang: Add support for this compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8781
2023-09-25 08:58:25 -04:00
Robert Maynard
cd984261e1 CUDA: Device linking now uses TARGET_OBJECTS content
Due to an oversight in cmLinkLineDeviceComputer object
files did not get propagate to the device linking phase
when given via the `$<TARGET_OBJECTS>` generator expression.
2023-09-25 08:50:38 -04:00
Ryan Krattiger
80838316a8 CrayClang: Add support for this compiler
Add `CrayClang` compiler ID for newer Cray compilers.

Fixes: #25102
2023-09-22 09:39:52 -04:00
Kyle Edwards
a7534c31e6 Tests: Update tests to run in multi-config generators 2023-09-22 09:30:52 -04:00
Kyle Edwards
59b0ae6b24 Tests: Update tests to run in symlinked tree 2023-09-22 09:30:52 -04:00
Brad King
122ec98dcf Merge topic 'hip-nvidia'
6546aa2a2a ci: Add HIP job using CUDA on NVIDIA GPUs
18158bf81c HIP: Add support for NVIDIA GPUs
127b6fa06b HIP: Add CMAKE_HIP_PLATFORM variable to specify GPU platform
90e23f40ee Tests/HIP/WithDefs: Clean up test case
9ebdf3281f Tests/HIP/ArchitectureOff: Cover HIP_ARCHITECTURES initialization
cfec29196e ci: Add CUDA 11.8 to HIP 5.5 image
26470eb987 ci: Put HIP GPU platform in CMake_TEST_HIP

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8817
2023-09-22 09:19:52 -04:00
Brad King
d2655c59dc Merge topic 'cuda-factor-out-lang'
b32ea7cff0 CUDA: Factor out helper to generate CUDA architecture flags
b3a1f17567 CUDA: Factor out helper to validate CMAKE_CUDA_ARCHITECTURES
8617c28221 CUDA: Factor out helper for detecting native CUDA architectures
0db0fe7958 CUDA: Factor out helper to compute all CUDA architectures
c16f1e2b93 CUDA: Factor out helper to find CUDA Toolkit for compiler
a6841a967b CUDA: Factor out helper to filter implicit link libraries
deff0e638d CUDA: Factor out helper to parse NVCC implicit compiler and linker flags
e1b2a5062f CUDA: Factor out some NVCC compiler information
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !8816
2023-09-22 09:18:53 -04:00
Brad King
2dafd1f092 Merge topic 'macOS-system-framework-link'
3bdf95f942 macOS: GNU toolchain: ensure framework, marked as SYSTEM, can be linked

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8825
2023-09-22 09:07:11 -04:00
Brad King
18158bf81c HIP: Add support for NVIDIA GPUs
Add support for using the CUDA Toolkit's NVCC to compile HIP code.

Fixes: #25143
2023-09-21 15:34:37 -04:00
Brad King
127b6fa06b HIP: Add CMAKE_HIP_PLATFORM variable to specify GPU platform
For now, require the value to be `amd`, since that is the only
platform we currently support.
2023-09-21 15:34:37 -04:00