Commit Graph

14395 Commits

Author SHA1 Message Date
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
Brad King
f8ed4d7c21 FindOpenMP: Factor out compiler id lookup 2024-09-27 09:55:47 -04:00
Brad King
534923428a FindOpenMP: Simplify compiler driver check
The compiler driver's verbose flag is needed only when linking because
we parse its output to get the implicit link information added by the
OpenMP flag.
2024-09-27 09:55:47 -04:00
Brad King
42bf0f596e FindOpenMP: Simplify explicit "omp" library checks
For toolchains that do not provide a builtin `omp` library the compiler
driver's OpenMP flag should not be needed when linking.  We also do not
need the compiler driver's verbose flag because we are not parsing its
output.
2024-09-27 09:55:47 -04:00
Craig Scott
0aa445bb9c GoogleTest: Modernize policies using block() / endblock() 2024-09-27 16:42:50 +10:00
Brad King
8a59fb1c90 FindDevIL: Replace http link with its redirect 2024-09-26 09:00:46 -04:00
Brad King
f77e36aa37 FindAVIFile: Replace http link with its redirect 2024-09-26 09:00:46 -04:00
Brad King
137a2060bc BinUtils: Prefer llvm-mt over mt when compiling with Clang
The problem motivating commit 73d0d4e4b5 (BinUtils: Avoid llvm-mt
because it is missing 'mt' features we use, 2022-03-08, v3.23.0-rc3~7^2)
has been fixed in `llvm-mt` since LLVM/Clang 14.0.2.

Fixes: #26319
Issue: #23305
2024-09-25 09:12:27 -04:00
Brad King
ee151bccfe Merge topic 'cuda-host-compiler-id'
3b4d0df670 NVCC: Detect host compiler id and version
38cacd83a5 Tests: Migrate compiler id tests to RunCMake infrastructure
37173f1ccc Tests/RunCMake: Generalize construction of arguments for languages to test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9841
2024-09-23 14:18:57 -04:00
Brad King
b24c5ae8ac Merge topic 'FindJPEG-doc'
698ea5bd94 FindJPEG: Fix documentation of include directory input variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9840
2024-09-23 14:16:15 -04:00
Brad King
3b4d0df670 NVCC: Detect host compiler id and version
Report them in `CMAKE_<LANG>_HOST_COMPILER_{ID,VERSION}` variables.

Fixes: #20901
2024-09-20 17:48:33 -04:00
Brad King
9d7280b6a7 FindBZip2: Document library input variables
Since commit 5b6ca9fa3f (FindBZip2: add support for debug libraries,
2012-01-10, v2.8.8~267^2) the `find_library` commands store results in
per-config library variables.  Document them.
2024-09-20 12:06:54 -04:00
Brad King
698ea5bd94 FindJPEG: Fix documentation of include directory input variable 2024-09-20 12:03:08 -04:00
Brad King
4aca6d8327 Merge topic 'cpack-nuget-native'
c358872976 CPack/NuGet: Add native0.0 to build dependencies in groups

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9829
2024-09-20 10:05:53 -04:00
Brad King
e8597f2b09 Merge topic 'FindMatlab-mcr'
9ceca05e6b FindMatlab: Search mex and mx libraries for MCR
67e3c6b6eb FindMatlab: Cache whether MATLAB root contains MCR or MATLAB
b426ce1d04 FindMatlab: Add support for MCR distributions without mex.h
cd4782bac3 FindMatlab: Only consider versioned MCR subdirectory if it exists

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9831
2024-09-20 10:04:21 -04:00
Hermann von Kleist
9ceca05e6b FindMatlab: Search mex and mx libraries for MCR
Further changes:
- Better documentation of library availabilities
- Log each library location in debug mode

Fixes: #26306
2024-09-19 15:33:19 +02:00
Hermann von Kleist
67e3c6b6eb FindMatlab: Cache whether MATLAB root contains MCR or MATLAB
Fixes: #26306
2024-09-19 15:33:06 +02:00
Diego Dassie
c358872976 CPack/NuGet: Add native0.0 to build dependencies in groups
Add the `native0.0` framework to the list of allowed frameworks allowing
native (C/C++) NuGet packages. This extends commit 0f4d3664a9
(CPack/NuGet: Build dependencies in groups, 2024-06-01, v3.30.0-rc1~18^2).

Fixes: #26305
2024-09-19 08:21:38 +02:00
Hermann von Kleist
b426ce1d04 FindMatlab: Add support for MCR distributions without mex.h
Consider `matrix.h` in search for include dirs.

Fixes: #26306
2024-09-18 11:19:16 -04:00
Hermann von Kleist
cd4782bac3 FindMatlab: Only consider versioned MCR subdirectory if it exists
Issue: #26306
2024-09-18 11:16:03 -04:00
Mark Abraham
3137faae6f FindHDF5: Avoid mentioning empty version when not found
Previously the not-found message confusingly mentioned an empty version
number:

    -- Could NOT find HDF5: Found unsuitable version "", ...

Don't confuse FindPackageHandleStandardArgs by defining an empty
version.
2024-09-18 10:55:11 -04:00
Brad King
671748819b Merge topic 'clang-cl-c++23'
474eafe28c clang-cl: Add support for C++23

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9818
2024-09-16 06:22:35 -04:00
Brad King
8143e1b051 Merge topic 'FindPython-FIND_ABI'
f885b007b9 FindPython: ensure all ABI are searched by default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Tested-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !9819
2024-09-16 06:17:59 -04:00
Brad King
d31f4b645b Merge topic 'FindPython-FIND_ABI' into release-3.30
f885b007b9 FindPython: ensure all ABI are searched by default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Tested-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !9819
2024-09-16 06:17:57 -04:00
Brad King
474eafe28c clang-cl: Add support for C++23
Although there is no `cl -std:c++23` flag, the underlying Clang compiler
does have a C++23 mode we can activate by passing `-std=c++23` through a
`clang-cl` wrapper flag.

Fixes: #26061
2024-09-13 12:28:49 -04:00
Brad King
e701265823 Merge topic 'matlab-macos'
b90d7a3a82 FindMatlab: On macOS search under ~/Applications and /Applications

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9814
2024-09-13 09:23:18 -04:00
Brad King
1f82060c76 Merge topic 'matlab-2024b'
20412181e9 FindMatlab: Add R2024b version map

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9813
2024-09-13 09:21:15 -04:00
Marc Chevrier
f885b007b9 FindPython: ensure all ABI are searched by default
Fixes: #26279
2024-09-12 19:22:40 +02:00
scivision
b90d7a3a82 FindMatlab: On macOS search under ~/Applications and /Applications
users with locked-down macOS may not be able to install their desired Matlab
under /Applications, but may use the standard ~/Applications instead
2024-09-12 12:37:30 -04:00
scivision
20412181e9 FindMatlab: Add R2024b version map 2024-09-12 12:34:00 -04:00