Commit Graph

13783 Commits

Author SHA1 Message Date
Máté Ferenc Nagy-Egri
4ecfd1a7dc FindPackageMessage: Remove extra whitespace from messages
In particular, the call to `find_package_message` from FPHSA may
have extra whitespace in some cases.
2024-01-16 12:05:15 -05:00
Brad King
97713da650 Merge topic 'swift-implib'
a2aad7eb8d Swift: fix Windows DLL import library support for CMP0157 NEW

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Jeremy Day <jadaytime@gmail.com>
Merge-request: !9140
2024-01-11 10:06:39 -05:00
Brad King
1c02642ee6 Merge topic 'package-dispatch-apple'
2a398cd9b6 CMakePackageConfigHelpers: Clarify generate_apple_*_selection_file signatures

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9130
2024-01-11 10:05:49 -05:00
Brad King
5b302bf5fe FindCxxTest: Drop broken anchor on link to cxxtest project page 2024-01-10 13:48:09 -05:00
Saleem Abdulrasool
a2aad7eb8d Swift: fix Windows DLL import library support for CMP0157 NEW
This was accidentally removed when the command templates were
reorganized to introduce the new policy. Restore the flag in the shared
library creation to ensure that we emit the import libraries to the
correct location.
2024-01-10 08:02:36 -08:00
Brad King
7557a722a5 Merge topic 'ewilde/swift-ninja-response-files'
a6a5c43300 Swift/Ninja: Add support for response files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9098
2024-01-09 10:53:59 -05:00
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
Evan Wilde
a6a5c43300 Swift/Ninja: Add support for response files
Adding support for `CMAKE_NINJA_FORCE_RESPONSE_FILE` with Swift.

Issue: #25490
Fixes: #25563
2024-01-08 09:11:27 -08: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
Brad King
2a398cd9b6 CMakePackageConfigHelpers: Clarify generate_apple_*_selection_file signatures
The helpers added by:

* commit 37bc3400cd (CMakePackageConfigHelpers: Add
                     generate_apple_platform_selection_file(), 2023-11-03)
* commit 4ac5a2f866 (CMakePackageConfigHelpers: Add
                     generate_apple_architecture_selection_file(), 2023-12-19)

were worded in terms of including package configuration files, but the
actual functionality is to include files *from* package configuration
files.  The included files do not themselves need to be usable as
package configuration files.

Rename the options and clarify the documentation accordingly.

Issue: #25262
Issue: #25516
2024-01-04 19:01:35 -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