Commit Graph

36182 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
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
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
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
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
Kitware Robot
e7e1a0bba0 CMake Nightly Date Stamp 2024-09-26 00:01:58 -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
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
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
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
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
75769719bd Merge topic 'project-vars'
c5f7e3bc3b Merge branch 'backport-project-vars' into project-vars
86ad7cc886 project: Only define non-cache vars if already defined
4c152752da Help: State valid scopes for using proj_SOURCE_DIR and proj_BINARY_DIR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9820
2024-09-23 14:13:57 -04:00
Gergely Meszaros
e3895f4a8b Linking: Preserve nested LINKER: prefixes as written
Previously LINKER:,-Xlinker and -Wl, options nested inside LINKER:
prefixes would be transformed to separate prefixed options.
This is confusing and undocumented behavior, instead preserve these
as written.

Fixes: #26298
2024-09-23 02:17:19 -07:00
Kitware Robot
b684ebf6ad CMake Nightly Date Stamp 2024-09-23 00:02:56 -04:00
Kitware Robot
926f43d0f6 CMake Nightly Date Stamp 2024-09-22 00:01:16 -04:00
Kitware Robot
ddd40a43ab CMake Nightly Date Stamp 2024-09-21 00:02:01 -04:00
Brad King
9285a9dc9a cmComputeLinkDepends: Add final dependency ordering to debug output
Print results of the main ordering algorithm before platform-specific
filtering by `CMAKE_<LANG>_LINK_LIBRARIES_PROCESSING`.
2024-09-20 13:45:46 -04:00
Brad King
f792db4ca2 cmComputeLinkDepends: Add undocumented per-target debug property
This will be useful for testing.
2024-09-20 13:45:46 -04:00
Brad King
80b469a51d cmComputeLinkDepends: Factor out string literals as named constants 2024-09-20 13:45:46 -04:00
Brad King
3bd73fcc76 cmComputeLinkDepends: Modernize member initialization 2024-09-20 13:45:46 -04:00
Brad King
8db69c767b cmComputeLinkDepends: Remove redundant member 2024-09-20 13:45:45 -04:00
Brad King
dccdd030cd cmComputeLinkDepends: Replace depender index sentinel value with cm::optional 2024-09-20 13:45:45 -04:00
Brad King
6c9d8dc243 cmComputeLinkDepends: Replace group index sentinel value with cm::optional 2024-09-20 13:45:45 -04:00
Brad King
80327430ad cmComputeLinkDepends: Avoid unsigned integer rollover 2024-09-20 13:45:45 -04:00
Brad King
445a82e5da cmComputeLinkDepends: Shorten local variable name 2024-09-20 13:45:45 -04:00
Brad King
3ce26c57ba cmMakefileTargetGenerator: Avoid crash on GetLinkInformation failure 2024-09-20 13:45:45 -04:00
Brad King
c5f7e3bc3b Merge branch 'backport-project-vars' into project-vars 2024-09-20 10:35:02 -04:00
Craig Scott
86ad7cc886 project: Only define non-cache vars if already defined
In c1ece78d11 (project: non cache <project> prefix variables are
also created, 2024-08-27), we started explicitly setting the non-cache
variable for <projectName>_SOURCE_DIR, <projectName>_BINARY_DIR,
and <projectName>_IS_TOP_LEVEL in addition to setting them as
cache variables. This changed the behavior when a project name
was used more than once, and the second project call happens in
the same scope or a child scope of the first. Previously, the first
project call would set cache variables, and the second project call
would not overwrite those cache variables. With the change in
c1ece78d11, after the second project call the non-cache variables
would mask the cache variables and the project code would see
a different value to what it did before.

Setting the non-cache variable was added to handle the case where
a call to FetchContent_MakeAvailable() would set some non-cache
variables, and it just so happened those matched the same cache
variables that the project() command would set in the project being
fetched. The fetched project would then see a different set of
project-specific variables compared to when it was built standalone.

This commit here narrows the change from c1ece78d11 such that
the non-cache variable is only set by project() if there was already
a non-cache variable set. This still fixes the motivating problem
c1ece78d11 was intended to solve, but it avoids changing the variable
values seen by a project that re-uses the same project name in related scopes.

Issue: #26243, #25714
Fixes: #26281
2024-09-20 10:33:25 -04:00
Brad King
fdceee50e6 Merge topic 'normalize-install-destination-paths'
6a1fac1450 install: Normalize DESTINATION paths
2184fcfb00 Tests: Configure RunCMake.install cases with correct build type
5a8a6dfe81 cmGeneratorExpression: Change Find() parameter type to cm::string_view
d810374b3d install(PACKAGE_INFO): Remove outdated TODO comment
d13ed01d54 Tests: Remove unused files from RunCMake.install

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9800
2024-09-20 10:27:30 -04:00
Brad King
ac8738c077 Merge topic 'update-kwsys'
c89c49d67b Merge branch 'upstream-KWSys' into update-kwsys
5c18d48fda KWSys 2024-09-19 (2d72c140)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9833
2024-09-20 10:12:11 -04:00
Brad King
ce8cd49dd7 Merge topic 'update-libarchive'
387a9a746a libarchive: tar: fix memory leaks when reading symlinks or parsing pax headers
dad12c8010 libarchive: Set build options the way we need for CMake
21affa271e Utilities: Update hard-coded try_compile results for libarchive 3.7.5
fe3f0d469f Merge branch 'upstream-LibArchive' into update-libarchive
9539a0df9c LibArchive 2024-09-13 (12ecf841)
dfbb1f2f0d libarchive: Update script to get 3.7.5

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9826
2024-09-20 10:07:48 -04:00
Kitware Robot
7e26c7cad9 CMake Nightly Date Stamp 2024-09-20 00:01:19 -04:00
Brad King
c89c49d67b Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2024-09-19 (2d72c140)
2024-09-19 11:34:52 -04:00
Brad King
77971a3b16 Merge topic 'install-type-libexec'
39603a7e5c install: Add TYPE LIBEXEC for FILES and DIRECTORY

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9817
2024-09-19 11:21:38 -04:00
Brad King
c060073721 Merge topic 'vs-sdk-custom-commands'
fd66818653 VS: Fix custom commands for DOTNET_SDK builds

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9827
2024-09-19 11:18:24 -04:00
Craig Scott
6a1fac1450 install: Normalize DESTINATION paths
The file generated by install(EXPORT) computes _IMPORT_PREFIX
in a way that assumes a normalized path. If the DESTINATION
contains any ../ components, the computed _IMPORT_PREFIX
would be wrong. Force the DESTINATION path to be normalized,
subject to the new CMP0176 policy.

Also normalize all other DESTINATION paths for consistency,
except for INCLUDES DESTINATION, which is not strictly a
destination but rather a search path to add.

Fixes: #26252
2024-09-19 20:31:47 +10:00
Kitware Robot
94cde61e8c CMake Nightly Date Stamp 2024-09-19 00:01:15 -04:00
Calum Robinson
fd66818653 VS: Fix custom commands for DOTNET_SDK builds
Fixes: #23723
2024-09-18 18:26:27 +01:00