Commit Graph

13775 Commits

Author SHA1 Message Date
Brad King
dda4232b4d Merge topic 'cpack-nuget-readme'
ccde6f8048 CPack/NuGet: Add support for repository tag
2c616e85cf CPack/NuGet: Add support for readme tag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9139
2024-01-09 09:59:18 -05:00
makise-homura
020e80d825 LCC: Add missing C/CXX compiler version checks for -std options 2024-01-08 15:25:57 -05:00
makise-homura
76a0a67026 GetPrerequisites: Tolerate multiple leading '/' in system library paths
On OS Elbrus 8.x, we see a dependency on `//usr/lib/libpcre2-8.so.0``
in the Qt4Deploy test.  Recognize it as a system path.
2024-01-08 15:25:57 -05:00
Alex Turbov
ccde6f8048 CPack/NuGet: Add support for repository tag
Fixes: #23703
2024-01-08 11:01:29 -05:00
Alex Turbov
2c616e85cf CPack/NuGet: Add support for readme tag
Fixes: #25542
2024-01-08 11:01:06 -05:00
Brad King
a3f76a4e4d Merge topic 'link-stubs-transitively'
2c6ec6de15 Link to transitive dependencies on stub libraries only on some linkers
dd4a6dff92 Link explicitly to private transitive dependencies on stub libraries
5f1bbdb3b3 Tests: Enable RunCMake.RuntimePath test on more platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9050
2024-01-08 09:47:15 -05:00
Brad King
1f66051983 Merge topic 'FindPkgConfig-caching'
e50aaf8547 FindPkgConfig: Update cache variables after isystem extraction
8fe6196714 FindPkgConfig: Update cache variables after framework extraction

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9109
2024-01-05 13:31:58 -05:00
Brad King
769be838cb Merge topic 'check_language_propagate_hip_platform'
ce9c6d0994 HIP: Propagate CMAKE_HIP_PLATFORM from/to the test project in check_language
9ba3fc91e5 HIP: Really forward CMAKE_HIP_HOST_COMPILER in check_language(HIP)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9121
2024-01-05 10:16:53 -05:00
Kai Pastor
e50aaf8547 FindPkgConfig: Update cache variables after isystem extraction
Fixes: #25377
2024-01-04 22:22:52 +01:00
Brad King
dd4a6dff92 Link explicitly to private transitive dependencies on stub libraries
We represent stub libraries, e.g., for CUDA, using imported `SHARED`
library targets with only `IMPORTED_IMPLIB`, and no `IMPORTED_LOCATION`,
to indicate that the stub file is meant only for linkers and not dynamic
loaders.  See commit 7351d590ee (cmTarget: Add a way to represent
imported shared library stubs, 2023-07-17, v3.28.0-rc1~344^2) and commit
fc6508921c (cmComputeLinkInformation: Restore soname lookup for
non-imported targets, 2023-12-05, v3.28.0~4^2).

If a shared library is linked to a stub, it has a `NEEDED` field
populated with the `SONAME` found in the stub.  When a dependent target
links to such a shared library, some linkers want to find a library file
on disk and load it to see what symbols it provides.  This is necessary
for linkers that enforce `--no-allow-shlib-undefined`.  On hosts with
only the stub library installed, e.g., with only the CUDA toolkit
development package, the real runtime library corresponding to the
stub's `SONAME` may not even exist, so no `-rpath-link` flag can help
linkers find it.  Pass the stub library to linkers explicitly so they
can find it without searching.
2024-01-04 11:59:26 -05:00
Brad King
5a61984088 Merge topic 'compute-compiler-linker'
459d1cc095 Tests: Verify that linker tool is detected and identified where expected
6aec4739c1 LinkerId: Record detection steps to configure log
ba5f8dbba3 LinkerId: Use empty string for unknown linker id
6cbd0658c5 LinkerId: Match Apple linker on all Apple platforms
9324668517 LinkerId: Fix detection of GNU linker id without parenthesis in version output
37bc148870 LinkerId: Fix detection of linker tool without path
6e527c2d38 LinkerId: Fix detection of linker tool for Clang on OpenBSD
455aed3061 LinkerId: Fix detection of linker tool for MSVC
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9086
2024-01-04 11:53:38 -05:00
Brad King
5dd4d3d4e3 Merge topic 'revert-ExternalProject-download-byproducts'
fd3c9876c6 ExternalProject: revert `BYPRODUCTS` for download outputs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9097
2024-01-04 11:35:11 -05:00
Gergely Meszaros
ce9c6d0994 HIP: Propagate CMAKE_HIP_PLATFORM from/to the test project in check_language
Fixes: #25541
2024-01-04 11:25:15 -05:00
Gergely Meszaros
9ba3fc91e5 HIP: Really forward CMAKE_HIP_HOST_COMPILER in check_language(HIP)
In commit b3e92775ab (HIP: Add CMAKE_HIP_HOST_COMPILER when compiler is
NVCC, 2023-09-25, v3.28.0-rc1~44^2~2) we accidentally left this out.
2024-01-03 18:15:21 -05:00
Brad King
6aec4739c1 LinkerId: Record detection steps to configure log 2024-01-03 17:07:53 -05:00
Brad King
ba5f8dbba3 LinkerId: Use empty string for unknown linker id
Since commit c26c6ac488 (Link Step: compute effective linker used by the
compiler, 2023-05-27) we used `UNKNOWN` if the linker id is not known.
This convention is not used elsewhere, and logic using the linker id
is easier when `if(CMAKE_C_COMPILER_LINKER_ID)` is false on unknown id.
2024-01-03 17:07:52 -05:00
Brad King
6cbd0658c5 LinkerId: Match Apple linker on all Apple platforms
`cmake_determine_linker_id` is only used for macOS because Apple device
platforms set `_CMAKE_FEATURE_DETECTION_TARGET_TYPE` to `STATIC_LIBRARY`,
but we might as well prepare for them anyway.
2024-01-03 17:07:52 -05:00
Brad King
9324668517 LinkerId: Fix detection of GNU linker id without parenthesis in version output 2024-01-03 17:07:52 -05:00
Brad King
37bc148870 LinkerId: Fix detection of linker tool without path
Some compiler drivers invoke the linker tool as just `ld`, with no path,
expecting it to be in the `PATH`.
2024-01-03 17:07:52 -05:00
Brad King
6e527c2d38 LinkerId: Fix detection of linker tool for Clang on OpenBSD
Do not match quotes as part of the path.
2024-01-03 17:07:51 -05:00
Brad King
455aed3061 LinkerId: Fix detection of linker tool for MSVC
Previously we matched an entire build system output line and then
extracted the relevant portion in a separate brittle step.  Match
it directly.  Use the `CMAKE_LINKER` value directly if available.
2024-01-03 17:05:55 -05:00
Brad King
78b7ba6494 LinkerId: Fix detection of linker tool for GNU on SunOS sparc32
We do not use `-Wl,-v` on SunOS because not all GNU deployments use the
`collect2` helper, and those that do do not always print the underlying
`ld` command line.  Parse the `--with-ld=` option as a fallback.
2024-01-03 16:24:58 -05:00
Brad King
dd480e5be5 LinkerId: Fix detection of linker tool for XL compilers
These compilers print an explicit `export XL_LINKER=` line.
Parse it separately.
2024-01-03 16:24:58 -05:00
Brad King
262de2ad92 LinkerId: Fix detection of linker tool for XL as nvcc host compiler
When IBM XL is used as the host compiler for nvcc, it generates a
comma-separated link line.  Parse the `exec:` line syntax separately, as
was done in commit b5f20da94d (CMakeParseImplicitLinkInfo supports comma
separated link lines, 2019-08-23, v3.16.0-rc1~181^2).
2024-01-03 16:24:57 -05:00
Brad King
a80dca88a1 LinkerId: Prepare detection of linker tool for multiple match attempts 2024-01-03 16:24:57 -05:00
Ben Boeckel
fd3c9876c6 ExternalProject: revert BYPRODUCTS for download outputs
Xcode has been reported to not work at all with this when
ExternalProject projects share download files.

Revert commit 872daff159 (ExternalProject: declare byproducts for the
download step, 2023-09-21, v3.28.0-rc1~27^2) pending further
investigation.

Fixes: #25525
2024-01-03 14:18:35 -05:00
Craig Scott
4253a41a67 Merge topic 'fix-redirect-links'
5a7927d028 Help: update lua.org links to be HTTPS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9114
2023-12-31 19:59:11 -05:00
Ben Boeckel
5a7927d028 Help: update lua.org links to be HTTPS
This is now a permanent redirect, so update links accordingly.
2024-01-01 11:32:32 +11:00
Kai Pastor
8fe6196714 FindPkgConfig: Update cache variables after framework extraction 2023-12-28 09:57:47 +01:00
Brad King
e6cd118f02 Merge topic 'package-dispatch-apple'
4ac5a2f866 CMakePackageConfigHelpers: Add generate_apple_architecture_selection_file()
b9f81ee9f9 CMakePackageConfigHelpers: Remove outdated documentation summary paragraph
68a03cf3d4 generate_apple_platform_selection_file: Add INSTALL_PREFIX option
ff21f0f70f Tests: Verify generate_apple_platform_selection_file file paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9092
2023-12-20 09:12:49 -05:00
Brad King
c0ab859154 Merge topic 'FindCURL-pkg-config'
ab6b44b1bb FindCURL: Fix parsing protocols/features from pkg-config output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9090
2023-12-20 09:06:08 -05:00
Brad King
26c6d554e0 Merge topic 'UsePkgConfig-trailing-whitespace'
61436858e4 UsePkgConfig: Restore removal of trailing whitespace from pkg-config output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9094
2023-12-20 09:03:40 -05:00
Jason E. Hale
61436858e4 UsePkgConfig: Restore removal of trailing whitespace from pkg-config output
Since commit f73a5bfaa9 (UsePkgConfig: Replace exec_program() with
execute_process(), 2023-07-24, v3.28.0-rc1~321^2~6), trailing whitespace
was introduced into libraries linked, which violates CMP0004.
2023-12-19 15:35:24 -05:00
lingbin
ab6b44b1bb FindCURL: Fix parsing protocols/features from pkg-config output
Previously `find_package(CURL COMPONENTS HTTP)` failed because the
`CURL_SUPPORTED_PROTOCOLS` variable returned by pkg-config is
a command-line fragment, but we need a semicolon-separated list.
2023-12-19 09:36:09 -05:00
Brad King
4ac5a2f866 CMakePackageConfigHelpers: Add generate_apple_architecture_selection_file()
Add a helper to select architecture-specific implementations of a
package on an Apple-specific platform.

Fixes: #25516
2023-12-19 08:56:30 -05:00
Brad King
b9f81ee9f9 CMakePackageConfigHelpers: Remove outdated documentation summary paragraph 2023-12-19 08:56:11 -05:00
Brad King
68a03cf3d4 generate_apple_platform_selection_file: Add INSTALL_PREFIX option
This is necessary to forward to `configure_package_config_file`.
2023-12-19 08:51:16 -05:00
Brad King
c3b4453b13 Merge topic 'gtest_discover_tests_error_message'
2ea216a6bb GoogleTest: Add working directory to gtest_discover_tests error message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9083
2023-12-19 08:10:55 -05:00
Brad King
d2cbadf3b4 Merge topic 'package-dispatch-apple'
dc5098429b CMakePackageConfigHelpers: Clarify Apple platform selection usage error
3b9586671c CMakePackageConfigHelpers: Clarify Apple platform selection template name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9087
2023-12-19 08:10:15 -05:00
Brad King
1a6303aa8c CMakePackageConfigHelpers: Fix generate_apple_platform_selection_file docs
Previously the documentation was not rendered correctly.
2023-12-18 16:35:46 -05:00
Brad King
dc5098429b CMakePackageConfigHelpers: Clarify Apple platform selection usage error
`generate_apple_platform_selection_file` requires `INSTALL_DESTINATION`.
2023-12-18 14:57:27 -05:00
Brad King
3b9586671c CMakePackageConfigHelpers: Clarify Apple platform selection template name
The template added by commit 37bc3400cd (CMakePackageConfigHelpers: Add
generate_apple_platform_selection_file(), 2023-11-03) is specific to
Apple platforms.  Give it an Apple-specific name.
2023-12-18 14:28:34 -05:00
Brad King
edb10c5325 Merge topic 'package-dispatch-apple'
1dd4a9baff Tests: Cover generate_apple_platform_selection_file on all platforms
3148db4533 CMakePackageConfigHelpers: Fix Apple platform selection for tvOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9077
2023-12-18 10:56:43 -05:00
Alexander Krabler
2ea216a6bb GoogleTest: Add working directory to gtest_discover_tests error message
If the working directory didn't exist, the old message just says:

    Error running test executable.

        Path: '<Path to test executable>'
        Result: No such file or directory
        Output:

This leads the user to the conclusion that the test executable doesn't
exist, which isn't true.  Make the true cause visible by reporting the
working directory in the error message.
2023-12-18 09:03:51 -05:00
Craig Scott
50e8791f92 Merge topic 'fc-provider-find-package-args'
0415304970 FetchContent: Fix FIND_PACKAGE_ARGS not being passed to dep providers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9080
2023-12-17 15:43:00 -05:00
Craig Scott
b7ad9bd8f3 Merge topic 'doc-fc-fully-disconnected'
18c514a86d Help: Add note not to use FETCHCONTENT_FULLY_DISCONNECTED on first run

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9081
2023-12-17 15:38:06 -05:00
Brad King
ba41ca758a Merge topic 'swift-split-compilation-model'
9bed4f4d81 Swift/Ninja: Split compilation model
64b3367845 cmGlobalGenerator: Allow passing language to GetLangaugeOutputExtension

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8907
2023-12-16 07:15:41 -05:00
Craig Scott
18c514a86d Help: Add note not to use FETCHCONTENT_FULLY_DISCONNECTED on first run
Fixes: #25481
2023-12-16 20:36:26 +11:00
Craig Scott
0415304970 FetchContent: Fix FIND_PACKAGE_ARGS not being passed to dep providers
Fixes: #25504
2023-12-16 16:42:00 +11:00
Brad King
3148db4533 CMakePackageConfigHelpers: Fix Apple platform selection for tvOS
Fix the tvOS SDK name in commit 37bc3400cd (CMakePackageConfigHelpers:
Add generate_apple_platform_selection_file(), 2023-11-03).
2023-12-15 16:33:22 -05:00