Commit Graph

14658 Commits

Author SHA1 Message Date
Brad King
27be881b3f Merge topic 'vs-clang-cl-c++23'
30139913e9 VS: Restore support for mixing C++23 and C in one target with clang-cl
57da8712c1 VS: Factor out check for mixed C and C++ target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10082
2024-12-10 09:12:04 -05:00
Brad King
30139913e9 VS: Restore support for mixing C++23 and C in one target with clang-cl
Since commit 474eafe28c (clang-cl: Add support for C++23, 2024-09-13,
v3.31.0-rc1~97^2) we use a Clang-specific flag to enable C++23 since
`clang-cl` has no `-std:c++23` flag, and `-std:c++latest` may enable an
even newer version of C++.  However, in `.vcxproj` files there is no way
to express a target-wide `-clang:-std=c++23` flag for only C++ sources
when the target also has C sources.  Add a special case to map back to
`-std:c++latest` for targets with C++23 and C together.

Fixes: #26508
2024-12-09 14:57:35 -05:00
Samuel Thibault
0c452257e7 hurd: Add relative rpath support 2024-12-09 01:22:18 +01:00
Peter Kokot
70ccf47e60 Help: Add more examples for condition syntax in commands
Issue: #26487
2024-12-06 03:09:46 +01:00
cfis
a023377b86 FindRuby: Move checking of RVM and System Ruby to separate functions. 2024-12-04 13:21:04 -08:00
David Tenty
a6f2e9eded IBMClang: Express compiler information as a Clang variant
De-duplicate IBMClang compiler information by detecting the base clang
version and following the same logic as we do for any other clang of
that version.  This helps maintain support for new IBMClang features
inherited from new base Clang versions.

We already use this approach for other Clang variants, like CrayClang
and FujitsuClang.
2024-12-04 14:01:52 -05:00
David Tenty
cac5eb3df2 CompilerId: Ensure internal compiler version string is not optimized out
This was missed in commit 27579e9cf1 (FujitsuClang: Add support for the
Fujitsu compiler in Clang mode, 2020-12-22, v3.21.0-rc1~402^2~5).
2024-12-04 09:28:57 -05:00
Brad King
39b96cb0d9 Merge topic 'vs-WindowsKernelModeDriver'
2709f07b4d VS: Add minimal support for Windows Kernel Mode Drivers
fec276e632 cmVisualStudio10TargetGenerator: Use inline member initialization

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10042
2024-12-04 08:52:56 -05:00
Brad King
61a57ea717 Merge topic 'doc-check-run'
94b6f8bf4a Help: Check*Runs requires exit code 0 for success

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10047
2024-12-04 08:51:40 -05:00
Brad King
5c490d671a Merge topic 'find_ruby_cleanup'
48bf16fba1 FindRuby: Remove unneeded code and define all functions at the top-level.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10063
2024-12-04 08:50:51 -05:00
scivision
94b6f8bf4a Help: Check*Runs requires exit code 0 for success
Explicitly state this requirement to avoid ambiguity in what is
'success' of a program.
2024-12-03 16:00:26 -05:00
cfis
48bf16fba1 FindRuby: Remove unneeded code and define all functions at the top-level. 2024-12-03 12:12:59 -08:00
Joseph Snyder
2709f07b4d VS: Add minimal support for Windows Kernel Mode Drivers
Extend the experimental support for `WindowsKernelModeDriver` to the
Visual Studio generators.  Hard-code some settings for now.
2024-12-03 14:18:52 -05:00
مهدي شينون (Mehdi Chinoune)
3c3f887ff6 FindOpenMP: Fix typo on omp Fortran module name. 2024-12-03 13:42:18 -05:00
Brad King
b1ab297d07 Merge topic 'FindPython-SABIModule-handling'
ff65c5fca0 FindPython: Ensure SABIModule is found in all cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10058
2024-12-03 09:04:42 -05:00
Brad King
50afcb61f7 Merge topic 'FindPython-SABIModule-handling' into release-3.31
ff65c5fca0 FindPython: Ensure SABIModule is found in all cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10058
2024-12-03 09:04:41 -05:00
Brad King
25ef01bd65 Merge topic 'flang-openmp'
c3bada79cd FindOpenMP: Fix Finding OpenMP for LLVMFlang on Windows.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10052
2024-12-03 09:03:48 -05:00
Brad King
2af8fee380 Merge topic 'FindRuby-3.4'
21e51dca1d FindRuby: Add support for 3.4

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10055
2024-12-03 09:00:47 -05:00
cfis
21e51dca1d FindRuby: Add support for 3.4 2024-12-02 13:25:54 -05:00
Marc Chevrier
ff65c5fca0 FindPython: Ensure SABIModule is found in all cases
Fixes: #26493
2024-12-02 17:37:18 +01:00
Brad King
40cb75e3a1 Merge topic 'linker-depfile-flag'
f4e74af1ea GNU linker: Use single-argument form of --dependency-file flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10049
2024-11-29 10:00:13 -05:00
Brad King
27647acc6c Merge topic 'linker-depfile-flag' into release-3.31
f4e74af1ea GNU linker: Use single-argument form of --dependency-file flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10049
2024-11-29 10:00:12 -05:00
Brad King
8d98c6b1c2 Merge topic 'intel-classic-no-linker-depfile'
aeaec06267 Intel/Classic: deactivate linker dependency file support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10048
2024-11-29 09:59:01 -05:00
مهدي شينون (Mehdi Chinoune)
c3bada79cd FindOpenMP: Fix Finding OpenMP for LLVMFlang on Windows. 2024-11-29 12:11:44 +01:00
Brad King
f4e74af1ea GNU linker: Use single-argument form of --dependency-file flag
The GNU `ld(1)` manual documents the `--dependency-file=depfile`
single-argument form of the flag.  Prefer it over the multi-argument
`--dependency-file depfile` form so that only one argument needs to be
passed through the compiler driver by `-Wl,` or equivalent.  This may
improve diagnostics in cases where it is unsupported, making them easier
to diagnose.

Issue: #26483
2024-11-28 10:07:52 -05:00
Marc Chevrier
aeaec06267 Intel/Classic: deactivate linker dependency file support
The Intel Classic compilers' IPO plugins do not support the
`-Wl,--dependency-file,...` linker flag.

Fixes: #26483
2024-11-28 09:54:22 -05:00
Brad King
14ed8464c8 Merge topic 'ARCHIVER-prefix'
a4ff2b01e3 IntelLLVM-Windows: add definitions for ARCHIVER: prefix
521a6d409c Archive library: Add support for ARCHIVER: prefix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10038
2024-11-28 09:22:38 -05:00
Brad King
e0fd630e93 Merge topic 'fphsa-refactorings'
a67df19d82 FPHSA: Consistent quoting in reported messages
440d4446f5 FPHSA: Consistent character case when mentioning the command name
998d5b1ad0 FPHSA: Consistent style for CMake command calls
c1d49b3f3c FPHSA: Refactor to use `ZIP_LISTS`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10044
2024-11-27 09:09:28 -05:00
Brad King
8a0ebc29da Merge topic 'FeatureSummary-condition-syntax'
6a7d5e414d FeatureSummary: Introduce policy CMP0183 for full Condition Syntax

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10031
2024-11-27 09:08:29 -05:00
Alex Turbov
a67df19d82 FPHSA: Consistent quoting in reported messages
Command names are not enclosed into quotes/backticks and have `()`
at the end. Named arguments (keywords) have no quotes as well.
2024-11-26 23:40:01 +04:00
Marc Chevrier
a4ff2b01e3 IntelLLVM-Windows: add definitions for ARCHIVER: prefix
Configure ARCHIVER: prefix to enable the archive libraries management
with Windows-IntelLLVM.

Issue: #26300
2024-11-26 19:26:08 +01:00
Peter Kokot
6a7d5e414d FeatureSummary: Introduce policy CMP0183 for full Condition Syntax
Closes: #26468
2024-11-26 13:19:25 -05:00
SunBlack
7e2aee4458 FindGDAL: Document as deprecated in favor of upstream CMake package
Issue: #26471
2024-11-26 13:13:20 -05:00
Alex Turbov
440d4446f5 FPHSA: Consistent character case when mentioning the command name 2024-11-26 19:58:25 +04:00
Alex Turbov
998d5b1ad0 FPHSA: Consistent style for CMake command calls
No space after a command name and before `()`!
2024-11-26 19:58:18 +04:00
Alex Turbov
c1d49b3f3c FPHSA: Refactor to use ZIP_LISTS 2024-11-26 19:58:14 +04:00
Marc Chevrier
a322aead0f CheckPIESupported: ensure PIE compile flags are specified
Fixes: #26463
2024-11-25 14:24:06 +01:00
Brad King
43c665fd85 Merge topic 'remove-trailing-blank-lines'
99ac59d31b style: Remove trailing blank lines from all CMake sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10026
2024-11-22 09:01:55 -05:00
Matthew Woehlke
99ac59d31b style: Remove trailing blank lines from all CMake sources
Our development workflow tooling prevents trailing blank lines
from being added, but some such lines remain from before that
was enforced.  Remove them to make it easier to rename files
without triggering enforcement.
2024-11-21 15:48:02 -05:00
Brad King
abbe8e860d Merge topic 'various-refactorings'
8352a2d12f cmFileCommand.cxx: Optimize `cmStrCat()` calls
e2c9bb7f54 cmFindBase.cxx: Optimize `cmStrCat()` calls
16a1fa9e35 cmFindBase.cxx: Check `DebugMode` and exit early to reduce indentation
6751b3d9b4 cmLocalGenerator.cxx: Optimize `std::ostream::operator<<()` calls
11bf70f968 FindPackageHandleStandardArgs: Remove the unneeded symbol from the message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10013
2024-11-20 09:34:21 -05:00
Brad King
68d15b17c3 Merge topic 'ExternalProject-install-jobserver'
1bdaad7573 ExternalProject: Optionally integrate 'make' job server with INSTALL_COMMAND

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10015
2024-11-20 09:33:04 -05:00
Brad King
3a483ccabe Merge topic 'pkg-config-versionadded'
c14a9c4648 Help: Correct FindPkgConfig version tags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10012
2024-11-20 09:28:26 -05:00
Brad King
1bdaad7573 ExternalProject: Optionally integrate 'make' job server with INSTALL_COMMAND
Add an `INSTALL_JOB_SERVER_AWARE` option to `ExternalProject_Add`.
When using an explicit `INSTALL_COMMAND`, the generated commands
won't use `$(MAKE)` thus failing to connect to the outer make's
job server.  Add an option enable explicit job server integration.

This is the install step's equivalent to the build step's
`BUILD_JOB_SERVER_AWARE` option added by commit bc43398e72
(ExternalProject: Enable Make Job Server with Explicit Build Command,
2023-08-09, v3.28.0-rc1~217^2).  It is useful when the external
project's installation is driven by its build system.  Note that with
Makefile generators, our default install command does use `$(MAKE)` to
connect to the outer make's job server.

Issue: #26398
2024-11-19 10:22:24 -05:00
Brad King
542c3259a3 Merge topic 'armclang-no--list'
688d9ee9c2 ARMClang: Remove orphaned linker --list option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10008
2024-11-19 10:15:38 -05:00
Brad King
af3a48a591 Merge topic 'Linux-deduplication-static-libs'
0445190d2f LLD linker: avoid regression on archive libraries deduplication

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10010
2024-11-19 10:14:42 -05:00
Alex Turbov
11bf70f968 FindPackageHandleStandardArgs: Remove the unneeded symbol from the message 2024-11-19 17:57:27 +04:00
FeRD (Frank Dana)
c14a9c4648 Help: Correct FindPkgConfig version tags
Two features in FindPkgConfig were added in a CMake version where
they were initially broken, and could only be used once the
implementation was fixed in a later version.

Previously, the docs contained a `.. versionadded` tag denoting the
version where the _broken_ implementation was introduced (its true
"version added", if we're being literal), with a comment in the
documentation source noting that the feature didn't actually work
correctly until whatever later version the comment specifies.

Since that's completely backwards, from a user perspective, reverse
the documentation so that the `.. versionadded` message shows when
the feature first worked **correctly**, with a comment noting that
support was technically introduced in an earlier version, but in a
broken/nonfunctioning state.
2024-11-19 02:23:25 -05:00
Marc Chevrier
0445190d2f LLD linker: avoid regression on archive libraries deduplication
Due to a bug on LLD linker for ELF binaries, deduplication should
occur only if CMP0156 and CMP0179 are NEW.

Fixes: #26447
2024-11-18 21:02:50 +01:00
Daniel Brondani
688d9ee9c2 ARMClang: Remove orphaned linker --list option
Setting the `armlink --list` option without other diagnostic flags is
misleading because it produces an empty file and prevents the user from
printing diagnostics to the standard output or redirecting them to
another file.

It's unclear why the flag was added when support for ARMClang was first
added by commit 7b0abaac31 (ARMClang: Add support for Clang-based ARM
compiler, 2019-05-13, v3.15.0-rc1~111^2).

Fixes: #21538
2024-11-18 13:59:16 -05:00
Brad King
79a83ddb08 Apple: Enable linking during iOS/tvOS/visionOS/watchOS toolchain inspection
Since commit 11da882a12 (Apple: Introduce separate system name for iOS,
tvOS, and watchOS, 2018-01-15, v3.14.0-rc1~14^2~1) our toolchain
inspection steps, like ABI detection, tell `try_compile` to use a
`STATIC_LIBRARY` instead of an `EXECUTABLE`.  This was needed at the
time to avoid codesign requirements.  However, commit d3a64c4e3f (Xcode:
Explicitly turn off signing in try_compile projects, 2020-07-16,
v3.19.0-rc1~483^2) introduced a more general solution to that problem.
Restore linking during toolchain inspection so that we can detect and
identify the linker.

Suggested-by: Marc Chevrier <marc.chevrier@gmail.com>
Fixes: #26443
2024-11-14 11:06:49 -05:00