Commit Graph

14425 Commits

Author SHA1 Message Date
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
Brad King
6a25904983 Merge topic 'musl-linux-any' into release-3.31
d8559ec92e Linux: Recognize multiarch directories for musl-linux-any

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9991
2024-11-13 09:19:23 -05:00
Brad King
3819471e71 Merge topic 'image-magick-7' into release-3.31
f6c6032e22 FindImageMagick: Fix ARCH_INCLUDE_DIR detection for version 7 and newer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9990
2024-11-13 09:18:18 -05:00
Brad King
10f24d1d92 Merge topic 'WHOLE_ARCHIVE-various-systems' into release-3.31
d2997ab601 Linker configuration: Add missing platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9992
2024-11-13 09:17:24 -05:00
Brad King
7c999c19af Merge topic 'gtest-discover-flush-duplicates' into release-3.31
007d7ea648 GoogleTest: Avoid extra call to set DISABLED test property in discovery
9a24c1e802 GoogleTest: Clear script content buffer on flush and flush less often

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9982
2024-11-13 09:14:37 -05:00
Timo Röhling
d8559ec92e Linux: Recognize multiarch directories for musl-linux-any
When bootstrapping Debian for musl-linux-any, the multiarch directories
are not found due to an overly-specific regular expression.

See https://bugs.debian.org/1085507 for the original bug report.
2024-11-12 10:47:40 -05:00
Marc Chevrier
d2997ab601 Linker configuration: Add missing platforms
The following platforms were missing:
* Android
* WindowsCE, WindowsPhone, WindowsStore and WindowsKernelModeDriver

And enhance various Apple platforms support (iOS, tvOS, etc...)

Fixes: #26439
2024-11-12 16:46:54 +01:00
Timo Röhling
f6c6032e22 FindImageMagick: Fix ARCH_INCLUDE_DIR detection for version 7 and newer
The `magick-baseconfig.h` header has been moved to a different subdirectory.

See https://bugs.debian.org/1087233 for the original bug report in Debian.
2024-11-12 10:38:54 -05:00
Craig Scott
007d7ea648 GoogleTest: Avoid extra call to set DISABLED test property in discovery
For very long test names, this can noticeably reduce the size of the
generated file contents when tests are disabled. This change reduces
how far beyond the flush threshold the content can grow before being
flushed.

Issue: #26431
2024-11-12 10:22:23 -05:00
Craig Scott
9a24c1e802 GoogleTest: Clear script content buffer on flush and flush less often
There's no need to check if flushing is needed after every command
is added to the variable holding the script content. It is enough to only
check once per test name. This simplifies the flushing logic, removing
the need for a separate flush_script() command. Previously, we were
not clearing the flushed script contents in all cases, but this is now
rigorously enforced at the one location where flushing is performed.

Also simplify the flushing of the list of test names, since that too doesn't
need a separate command. It is simpler and safer to handle that
directly inline where the one call to flush_tests_buffer() was
previously being made.

Fixes: #26431
2024-11-12 10:22:21 -05:00
Brad King
4f0eb0a41e Merge topic 'FindSQLite3-pkg-config' into release-3.31
2d228201fc Help: Guard calls to pkg_check_modules in cmake-developer(7) example
674a987898 FindSQLite3: Guard calls to pkg_check_modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9983
2024-11-12 10:16:46 -05:00
Brad King
20a1ee1a9d Merge topic 'FindBoost-1.86' into release-3.31
f941fb6c0b FindBoost: Add support for Boost 1.86

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9988
2024-11-12 10:13:31 -05:00
Brad King
f941fb6c0b FindBoost: Add support for Boost 1.86
Update the list of known versions.

Run the command

    cmake -DBOOST_DIR=/path/to/boost_1_86_0 \
      -P Utilities/Scripts/BoostScanDeps.cmake

to extract dependencies from the 1.86.0 source tree.
They are the same as 1.85's dependencies, so just update
the version check for warning about newer versions.

Fixes: #26433
2024-11-11 13:44:47 -05:00
Peter Kokot
674a987898 FindSQLite3: Guard calls to pkg_check_modules
This was missed in commit 25b947589a (Modules: Guard calls to
pkg_check_modules, 2024-08-07, v3.31.0-rc1~236^2).
2024-11-11 10:53:21 -05:00
Brad King
fcff1dcb06 Merge topic 'FindCUDAToolkit-remove-debug-message' into release-3.31
fb0b3d1585 FindCUDAToolkit: Remove debug message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !9946
2024-10-28 09:28:00 -04:00
Brad King
7605228f5e codespell: Fix typos 2024-10-25 08:43:04 -04:00
Seth R Johnson
fb0b3d1585 FindCUDAToolkit: Remove debug message
This was left accidentally by commit 587c0443cc (FindCUDAToolkit:
Support CUDA version extraction from version.json, 2023-05-02,
v3.26.4~3^2).
2024-10-25 08:32:00 -04:00
Brad King
ebd038613e Merge topic 'windows-kernel-mode-driver' into release-3.31
54bbd00448 WindowsKernelModeDriver: Switch to appending to variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9941
2024-10-25 08:21:32 -04:00
Brad King
0a37acc607 Merge topic 'lfortran-link-info' into release-3.31
34067963cc LFortran: Improve detection of implicit link information for lfortran 0.40+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9939
2024-10-25 08:19:54 -04:00
Joseph Snyder
54bbd00448 WindowsKernelModeDriver: Switch to appending to variables
When using the WindowsKernelModeDriver, do not add the new paths
if the variable was not previously defined.  Instead, append them
to the existing value.

Add a new GUID for the Experimental mode gate
2024-10-24 13:20:08 -04:00
Brad King
34067963cc LFortran: Improve detection of implicit link information for lfortran 0.40+
These versions of LFortran support passing `-v -Wl,-v` to the underlying
compiler so we can extract the full implicit link information.

Issue: #26145
2024-10-24 11:15:12 -04:00
Marc Chevrier
0619c064ff Linker configuration: enhance usability
The linker configuration file is now optional: It is loaded only if
variable CMAKE_<LANG>_USE_LINKER_CONFIGURATION is set to TRUE.

The file CMakeAddNewLanguage.txt is updated to take into account the
linker configuration.

Fixes: #26393
2024-10-24 16:37:30 +02:00
Brad King
da4a815c3a Merge topic 'python3.14' into release-3.31
be958c8f35 FindPython: Add support for Python 3.14

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9915
2024-10-18 07:36:52 -04:00
Miro Hrončok
be958c8f35 FindPython: Add support for Python 3.14 2024-10-17 20:04:25 -04:00
Brad King
b49b03a62e Xcode: Use ad-hoc signing during compiler id for iOS Mac Catalyst
In commit 2785364b7b (iOS: Add support for Mac Catalyst, 2024-07-02,
v3.31.0-rc1~371^2) we forgot to update the conditions to use ad-hoc
signing from commit 89e1113e0c (Xcode: Use ad-hoc signing during
compiler id on macOS, 2022-06-10, v3.22.6~4^2~2).

Fixes: #26376
2024-10-16 15:04:56 -04:00
Robert Maynard
9d29544082 FindCUDAToolkit: nvrtc shouldn't hard depend on nvJitLink
The dependency on nvJitLink was due to misunderstanding how runtime compiled code that uses
LTO is used. It doesn't require nvrtc to have a dependency on nvJitLink, just the caller.
2024-10-14 10:16:29 -04:00
Robert Maynard
7671a2f4c1 CUDAToolkit: nvrtc shouldn't hard depend on nvrtc-builtins
Depending on nvrtc-builtins breaks CUDA enhanced compatibility across
minor versions. The static version of nvrtc continues to need the
dependency due to undefined symbols
2024-10-09 11:58:04 -04:00
Brad King
f7b29f0f0b Merge topic 'FindProtobuf-protoc-missing'
4a1177246d FindProtobuf: Fail protobuf_generate early if protoc is missing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9880
2024-10-09 09:12:52 -04:00
JiaRui Liu
4a1177246d FindProtobuf: Fail protobuf_generate early if protoc is missing 2024-10-08 08:33:35 +08:00
Brad King
a4b60d948d FindOpenMP: Add support for CUDA when compiling with Clang 2024-10-07 14:19:08 -04:00
Brad King
cfa888a6e2 Clang/CUDA: Add language-wide flags when linking with compiler driver
We do this for other compiler/language combinations, but these flags
were left out by commit 5df21adf46 (CUDA: Add support for Clang
compiler, 2020-03-07, v3.18.0-rc1~145^2~1).
2024-10-07 11:57:24 -04:00
Brad King
9a14348a2c Merge topic 'GoogleTest-DISCOVERY_EXTRA_ARGS'
2dcba446e2 GoogleTest: Add DISCOVERY_EXTRA_ARGS to gtest_discover_tests()
f55f9fd5c1 Help: Mention TEST_LIST with gtest_discover_tests() can omit tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9856
2024-10-07 09:10:44 -04:00
Brad King
ae64e85ca9 Merge topic 'ci-linkcheck'
7cc12caa32 FindDevIL: Restore http link after redirect was removed
51c737515b FindAVIFile: Restore http link after redirect was removed

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9877
2024-10-07 09:06:47 -04:00
Brad King
d734f8dc6d Merge topic 'deprecate-pre-3.10'
84db8506ff Deprecate compatibility with CMake versions older than 3.10
9e3b559b6a Tests: Update cmake_minimum_required versions to 3.10
f4aa34daa7 Tests/RunCMake: Update cmake_minimum_required versions to 3.10
1d38d52995 Tests/RunCMake: Match diagnostic line numbers more robustly
55778f5a16 ExternalProject: Enable all policies in internal scripts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9875
2024-10-04 10:26:23 -04:00
Brad King
3b2b5ca096 Merge topic 'cpack-deb-depends-list'
443a06807c CPackDeb: always treat PACKAGE_DEPENDS as a list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9873
2024-10-04 09:16:56 -04:00
Brad King
7cc12caa32 FindDevIL: Restore http link after redirect was removed
Revert the URL change from commit 8a59fb1c90 (FindDevIL: Replace http
link with its redirect, 2024-09-26), as the http redirect seems to have
been removed.
2024-10-04 09:13:07 -04:00
Brad King
51c737515b FindAVIFile: Restore http link after redirect was removed
Revert the URL change from commit f77e36aa37 (FindAVIFile: Replace http
link with its redirect, 2024-09-26), as the http redirect seems to have
been removed.
2024-10-04 09:12:05 -04:00
Cedric Martineau
2dcba446e2 GoogleTest: Add DISCOVERY_EXTRA_ARGS to gtest_discover_tests()
Fixes: #26261
Co-authored-by: Craig Scott <craig.scott@crascit.com>
2024-10-04 18:12:30 +10:00
Craig Scott
f55f9fd5c1 Help: Mention TEST_LIST with gtest_discover_tests() can omit tests
Test names with square brackets can't be safely parsed in the
list returned through TEST_LIST, so they are omitted from the
list. This was implemented in 8b85b10fb3 (GoogleTest: Add
handling for square brackets in test names, 2022-01-05), but the
documentation wasn't updated as part of that change.
2024-10-04 18:11:28 +10:00
Brad King
55778f5a16 ExternalProject: Enable all policies in internal scripts 2024-10-03 10:23:37 -04:00
Edoardo Bortolozzo
443a06807c CPackDeb: always treat PACKAGE_DEPENDS as a list
Remove some edge cases where if CPACK_DEBIAN_PACKAGE_DEPENDS is a list
it would not be expanded on all components leaving some with ';'(s) in
the Depends field of the control file.
Same goes for using CPACK_DEBIAN_PACKAGE_SHLIBDEPS.
2024-10-03 08:52:14 -04:00
scivision
247497eacf NVHPC: Record C++23 support
NVHPC 24.9 documents support for `-std=c++23` [1].

[1] https://docs.nvidia.com/hpc-sdk/archive/24.9/hpc-sdk-release-notes/index.html
2024-10-02 10:34:35 -04:00
Brad King
823e0a3a61 Merge topic 'preserve-empty-args-test-command-lines'
fc7aa3cd69 tests: Preserve empty arguments in test command lines
9f1703530b Help: Add pre-test to prose for gtest_discover_tests()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9575
2024-10-02 08:11:57 -04:00
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
Brad King
80d16018fa Merge topic 'FindOpenMP-CUDA'
8f4cea94da FindOpenMP: Add support for CUDA when supported by the toolchain
f8ed4d7c21 FindOpenMP: Factor out compiler id lookup
534923428a FindOpenMP: Simplify compiler driver check
42bf0f596e FindOpenMP: Simplify explicit "omp" library checks
5204262c0e ci: add libomp to cuda12.2 base image

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9861
2024-09-30 09:56:45 -04: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
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
8f4cea94da FindOpenMP: Add support for CUDA when supported by the toolchain
NVCC supports OpenMP on the host when the host compiler does.
2024-09-27 16:45:24 -04:00