Commit Graph

67375 Commits

Author SHA1 Message Date
Craig Scott fc7aa3cd69 tests: Preserve empty arguments in test command lines
This will now preserve empty values in the TEST_LAUNCHER and
CROSSCOMPILING_EMULATOR target properties for tests added by:

- The add_test() command.
- The ExternalData_Add_Test() command from the ExternalData module.
- The gtest_add_tests() or gtest_discover_tests() commands from the
  GoogleTest module.

For the gtest_add_tests() and gtest_discover_tests() commands,
empty elements in the values passed after the EXTRA_ARGS keyword
are also now preserved.

Policy CMP0178 is added to provide backward compatibility with the
old behavior where empty values were silently discarded from the
above cases.

Fixes: #26337
2024-10-02 10:09:11 +10:00
Craig Scott 9f1703530b Help: Add pre-test to prose for gtest_discover_tests()
The prose previously gave the impression that discovery was always done
as a post-build operation, but later in the documentation the
DISCOVERY_MODE option is explained where pre-test can also be specified.
Update the earlier prose to mention both methods equally.
2024-09-30 21:11:10 +10:00
Craig Scott b5403cdc5d Merge topic 'googletest-cleanup-internal'
2cc42d986d GoogleTest: Improve internally used variable names
188b7e7339 GoogleTest: Minor reformatting
0aa445bb9c GoogleTest: Modernize policies using block() / endblock()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9862
2024-09-30 07:10:01 -04:00
Kitware Robot 0b5854af64 CMake Nightly Date Stamp 2024-09-30 00:02:12 -04:00
Kitware Robot 38e7747911 CMake Nightly Date Stamp 2024-09-29 00:01:17 -04:00
Kitware Robot f85bcb8474 CMake Nightly Date Stamp 2024-09-28 00:01:30 -04:00
Craig Scott 2cc42d986d GoogleTest: Improve internally used variable names
- Use an "arg" prefix for cmake_parse_arguments() rather than
  an empty string or uppercase ARGS so that usages of parsed
  values don't start with a bare underscore or look fully
  uppercase. This makes it harder to miss them or mistake
  them for keywords.
- Use lowercase for names of positional function arguments
  so they don't get mistaken for keywords.
2024-09-28 08:03:27 +10:00
Craig Scott 188b7e7339 GoogleTest: Minor reformatting
- Wrap long lines in file() calls.
- Condense some unnecessary and confusing quotes/spaces in a call
  many arguments built up in a string.
2024-09-28 08:03:26 +10:00
Brad King f7cdfa9938 Merge branch 'release-3.30' 2024-09-27 09:19:32 -04:00
Brad King 5e4526d6dd CMake 3.30.4 v3.30.4 2024-09-27 08:32:31 -04:00
Brad King f7e2422c3e Merge topic 'curl-tls-version'
38390245a2 ctest: Require minimum TLS 1.2 by default
5e1a59dc2b file(DOWNLOAD/UPLOAD): Require minimum TLS 1.2 by default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9848
2024-09-27 08:03:01 -04:00
Brad King 5701ba7484 Merge topic 'curl-default-cainfo'
5a06872f1e cmake: Add default CA path /var/ssl/certs on AIX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9854
2024-09-27 08:01:41 -04:00
Brad King 590f1d28e0 Merge branch 'release-3.30' 2024-09-27 07:58:44 -04:00
Brad King 536f3e27d6 Merge topic 'project-vars'
73a8f944b2 Help: Add 3.30 release notes for project variable updates

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9853
2024-09-27 07:58:43 -04:00
Brad King 035ca0569e Merge topic 'project-vars' into release-3.30
73a8f944b2 Help: Add 3.30 release notes for project variable updates

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9853
2024-09-27 07:58:41 -04:00
Brad King 36a855bf87 Merge topic 'ci-linkcheck'
8a59fb1c90 FindDevIL: Replace http link with its redirect
f77e36aa37 FindAVIFile: Replace http link with its redirect

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9852
2024-09-27 07:52:25 -04:00
Craig Scott 0aa445bb9c GoogleTest: Modernize policies using block() / endblock() 2024-09-27 16:42:50 +10:00
Kitware Robot 3615290dc7 CMake Nightly Date Stamp 2024-09-27 00:01:14 -04:00
Brad King 5a06872f1e cmake: Add default CA path /var/ssl/certs on AIX
Extend commit 0abd3e538e (cmake: Use a default CA path when not using
system curl, 2015-01-22, v3.2.0-rc1~66^2) to cover AIX.
2024-09-26 13:18:44 -04:00
Brad King 38390245a2 ctest: Require minimum TLS 1.2 by default
Issue: #25701
2024-09-26 10:10:48 -04:00
Brad King 5e1a59dc2b file(DOWNLOAD/UPLOAD): Require minimum TLS 1.2 by default
Fixes: #25701
2024-09-26 10:10:20 -04:00
Brad King 73a8f944b2 Help: Add 3.30 release notes for project variable updates
Add a 3.30.3 release note for commit c1ece78d11 (project: non cache
<project> prefix variables are also created, 2024-08-27, v3.30.3~2^2).
Prepare a 3.30.4 release note for commit 86ad7cc886 (project: Only
define non-cache vars if already defined, 2024-09-15).
2024-09-26 09:41:33 -04:00
Brad King 8a59fb1c90 FindDevIL: Replace http link with its redirect 2024-09-26 09:00:46 -04:00
Brad King f77e36aa37 FindAVIFile: Replace http link with its redirect 2024-09-26 09:00:46 -04:00
Brad King 53f3e5da1e Merge topic 'link-strategy'
7abd3137b7 Linking: Optionally reorder direct dependencies from LINK_LIBRARIES
9285a9dc9a cmComputeLinkDepends: Add final dependency ordering to debug output
f792db4ca2 cmComputeLinkDepends: Add undocumented per-target debug property
80b469a51d cmComputeLinkDepends: Factor out string literals as named constants
3bd73fcc76 cmComputeLinkDepends: Modernize member initialization
8db69c767b cmComputeLinkDepends: Remove redundant member
dccdd030cd cmComputeLinkDepends: Replace depender index sentinel value with cm::optional
6c9d8dc243 cmComputeLinkDepends: Replace group index sentinel value with cm::optional
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9835
2024-09-26 08:47:47 -04:00
Brad King 8d69aa79b0 Merge topic 'net-sdk-configurations'
55a5094f0e VS: Fix missing <Configurations> property for DOTNET_SDK

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9849
2024-09-26 08:41:34 -04:00
Brad King f8c96b2395 Merge topic 'binutils-llvm-mt'
137a2060bc BinUtils: Prefer llvm-mt over mt when compiling with Clang

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9847
2024-09-26 08:40:45 -04:00
Brad King 1d3706021e Merge topic 'ci-cuda-nvcc-clang'
515bcd77e5 ci: add job testing cuda12.2 with nvcc using clang 18 as host compiler
33406182a5 Tests: Honor CUDAFLAGS in all CUDA tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9850
2024-09-26 08:35:39 -04:00
Kitware Robot e7e1a0bba0 CMake Nightly Date Stamp 2024-09-26 00:01:58 -04:00
Brad King 515bcd77e5 ci: add job testing cuda12.2 with nvcc using clang 18 as host compiler 2024-09-25 16:53:06 -04:00
Brad King 33406182a5 Tests: Honor CUDAFLAGS in all CUDA tests 2024-09-25 16:30:02 -04:00
Calum Robinson 55a5094f0e VS: Fix missing <Configurations> property for DOTNET_SDK
Fixes #26325
2024-09-25 16:20:12 +01:00
Brad King b1aba2fb4e Merge topic 'doc-include_external_msproject'
6b7e634b7c Help: Explicitly state include_external_msproject is only for VS generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: martingalvan-volue <martin.galvan@volue.com>
Merge-request: !9846
2024-09-25 10:00:06 -04:00
Brad King 137a2060bc BinUtils: Prefer llvm-mt over mt when compiling with Clang
The problem motivating commit 73d0d4e4b5 (BinUtils: Avoid llvm-mt
because it is missing 'mt' features we use, 2022-03-08, v3.23.0-rc3~7^2)
has been fixed in `llvm-mt` since LLVM/Clang 14.0.2.

Fixes: #26319
Issue: #23305
2024-09-25 09:12:27 -04:00
Brad King 0acff8e622 Merge topic 'curl-tls-version'
5d2ea8371d Tests/RunCMake/file-DOWNLOAD: Add case covering TLS_VERSION values
c864ffceb7 Tests/RunCMake/file-DOWNLOAD: Clarify name of invalid TLS_VERSION case

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9845
2024-09-25 09:03:34 -04:00
Brad King 506255b1f1 Merge topic 'nested_linker_prefixes'
e3895f4a8b Linking: Preserve nested LINKER: prefixes as written
4185dfbe1b Tests/LINK_OPTIONS: extract common code in test (NFC)
54381b5a81 Linking: extract wrapping linker options to a lambda (NFC)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9823
2024-09-25 08:58:26 -04:00
Brad King 6b7e634b7c Help: Explicitly state include_external_msproject is only for VS generators
Fixes: #19975
2024-09-25 07:24:32 -04:00
Brad King 7abd3137b7 Linking: Optionally reorder direct dependencies from LINK_LIBRARIES
Traditionally CMake generates link lines by starting with the direct
link dependencies specified by `LINK_LIBRARIES` in their original order
and then appending indirect dependencies that the direct dependencies
do not express.  This gives projects control over ordering among
independent entries, which can be important when intermixing flags
and libraries, or when multiple libraries provide the same symbol.
However, it may also result in inefficient link lines.

Add support for an alternative strategy that can reorder direct link
dependencies to produce more efficient link lines.  This is useful
for projects that cannot easily specify their targets' direct
dependencies in an order that satisfies indirect dependencies.

Add a `CMAKE_LINK_LIBRARIES_STRATEGY` variable and corresponding
`LINK_LIBRARIES_STRATEGY` target property to select a strategy.

Fixes: #26271
2024-09-25 06:48:57 -04:00
Kitware Robot 57480c7676 CMake Nightly Date Stamp 2024-09-25 00:01:15 -04:00
Brad King 5d2ea8371d Tests/RunCMake/file-DOWNLOAD: Add case covering TLS_VERSION values 2024-09-24 12:37:45 -04:00
Brad King c864ffceb7 Tests/RunCMake/file-DOWNLOAD: Clarify name of invalid TLS_VERSION case
The test case is about an invalid version specification,
not a TLS version unsupported by the server.
2024-09-24 11:59:55 -04:00
Brad King ea3405ff60 Merge topic 'curl-tls-verify'
4e62bc943c ctest: Verify TLS server certificate by default
8e92ee34f6 file(DOWNLOAD/UPLOAD): Verify TLS server certificate by default
dcaea54898 cmCTestCurl: Clarify names and logic using optional<bool>
03d37ae3ff cmFileCommand: Clarify names and logic using optional<bool>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9843
2024-09-24 10:35:19 -04:00
Brad King 30d3df00c7 Merge topic 'FindOpenMP-test-link'
795be0f55f Tests/FindOpenMP: Verify linking to OpenMP libraries
6f136808a9 Tests/FindOpenMP: Add label for Fortran when it is enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9844
2024-09-24 10:33:54 -04:00
Brad King 4e62bc943c ctest: Verify TLS server certificate by default
Issue: #23608
2024-09-24 08:37:23 -04:00
Brad King 8e92ee34f6 file(DOWNLOAD/UPLOAD): Verify TLS server certificate by default
If the connection fails in a way that might be a certificate error, and
verification was enabled by the new default, mention environment
variable `CMAKE_TLS_VERIFY` in the diagnostic to help users that were
relying on the old behavior turn off server certificate verification in
their environment.

Fixes: #23608
2024-09-24 08:37:23 -04:00
Brad King dcaea54898 cmCTestCurl: Clarify names and logic using optional<bool> 2024-09-24 08:37:23 -04:00
Brad King 03d37ae3ff cmFileCommand: Clarify names and logic using optional<bool> 2024-09-24 08:36:30 -04:00
Kitware Robot b5ccbe2252 CMake Nightly Date Stamp 2024-09-24 00:01:26 -04:00
Brad King 795be0f55f Tests/FindOpenMP: Verify linking to OpenMP libraries
Previously we only verified the `_OPENMP` preprocessor symbol.
2024-09-23 15:52:12 -04:00
Brad King 6f136808a9 Tests/FindOpenMP: Add label for Fortran when it is enabled 2024-09-23 15:17:34 -04:00