Commit Graph

13250 Commits

Author SHA1 Message Date
Moses Miller
b1b7298b17 FindX11: Fix typo bug, xvmc -> xv 2023-04-25 10:06:00 -04:00
Moses Miller
858fd8ece8 FindX11: Add many new xcb modules 2023-04-25 10:05:59 -04:00
Moses Miller
45c3831369 FindX11: Arrange xcb modules in proper alphabetical order 2023-04-25 10:05:59 -04:00
Moses Miller
a0d8556bf7 FindX11: Change find_path search string for Xaw
As far as I can tell, X11/Xaw/Intrinsic.h has never existed, resulting
in FindX11 always failing to find Xaw.
2023-04-25 10:05:59 -04:00
Craig Scott
453cf8a196 Merge topic 'ninja-nvhpc-fortran-Werror'
6b58cdd4cf Ninja: Exclude NVHPC -Werror flags during Fortran preprocessing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8393
2023-04-10 17:34:47 -04:00
Brad King
3f68cb080f Merge topic 'FindOpenSSL-mingw'
248689f9bf FindOpenSSL: Fix finding header files and static libraries on MinGW

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8394
2023-04-06 09:09:42 -04:00
Brad King
8b9c2b0009 Merge topic 'FindCUDAToolkit-nvptxcompiler_static-deps'
8711231739 FindCUDAToolkit: nvptxcompiler_static correctly specify dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8395
2023-04-06 09:05:50 -04:00
Brad King
d797c3c8e9 Merge topic 'FindCUDAToolkit-cusparse-deps'
516d807423 FindCUDAToolkit: Add dependency between cusparse and nvJitLink

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8397
2023-04-06 09:04:43 -04:00
Robert Maynard
516d807423 FindCUDAToolkit: Add dependency between cusparse and nvJitLink
Starting in CUDA 12.0 cusparse uses nvJitLink. As part of verifying this PR I also corrected the nvJitLink dependencies
2023-04-05 11:37:06 -04:00
Robert Maynard
8711231739 FindCUDAToolkit: nvptxcompiler_static correctly specify dependencies
Avoids linking to `Threads::Threads` on non-unix systems where it isn't needed. In addition ensures that dlopen symbols are resolved.
2023-04-05 10:57:55 -04:00
مهدي شينون (Mehdi Chinoune)
248689f9bf FindOpenSSL: Fix finding header files and static libraries on MinGW
* Avoid searching in the `Program Files` folder because the official
  OpenSSL is built for the MSVC ABI, and so is not compatible with MinGW.

* Static libraries on MinGW has `.a` extension.
2023-04-05 09:49:31 -04:00
Brad King
6b58cdd4cf Ninja: Exclude NVHPC -Werror flags during Fortran preprocessing
The Ninja generator preprocesses Fortran separately in order to scan for
module dependencies.  NVHPC's `nvfortran` does not support its `-Werror`
flag while preprocessing with `-E`, so filter it out.

Fixes: #24665
2023-04-04 14:53:26 -04:00
Brad King
87b97464f7 Merge topic 'FindBLAS-LAPACK-vendor-var'
9d18426c47 Find{BLAS,LAPACK}: Prefer BLA_VENDOR cmake variable over env variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8387
2023-04-04 09:30:39 -04:00
Brad King
c07e915adb Merge topic 'swift-xcode-14.3'
52dbfefe0d Xcode: Fix detection of Swift compiler location for Xcode 14.3

Merge-request: !8388
2023-04-04 09:26:01 -04:00
Brad King
f8deb84120 Merge topic 'swift-xcode-14.3' into release-3.26
52dbfefe0d Xcode: Fix detection of Swift compiler location for Xcode 14.3

Merge-request: !8388
2023-04-04 09:24:57 -04:00
Brad King
52dbfefe0d Xcode: Fix detection of Swift compiler location for Xcode 14.3
Previously we tried to match output from `xcodebuild` to detect the
path to the `swiftc` tool.  This approach is used for C and CXX
for historical reasons, but is unnecessary for Swift.  We know the
name of the tool, so we can just ask `xcrun --find swiftc`.

Fixes: #24666
2023-04-03 18:59:57 -04:00
Brad King
9d18426c47 Find{BLAS,LAPACK}: Prefer BLA_VENDOR cmake variable over env variable
This is implied by the documentation, but was not implemented properly.

Fixes: #24664
2023-04-03 09:58:58 -04:00
Brad King
997e5fa714 Merge topic 'vs-fortran-try_compile'
4da50fe3f4 VS: Remove extra try_compile argument in Intel Fortran check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8383
2023-04-03 08:56:55 -04:00
Brad King
921ffd3070 Merge topic 'vs-fortran-try_compile' into release-3.26
4da50fe3f4 VS: Remove extra try_compile argument in Intel Fortran check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8383
2023-04-03 08:56:54 -04:00
Brad King
4da50fe3f4 VS: Remove extra try_compile argument in Intel Fortran check
Refactoring in commit d00d8537f6 (Modules: Use new keyword-dispatched
try_compile signature, 2022-09-16, v3.25.0-rc1~115^2) accidentally
left one of the old signature arguments behind, causing a warning.
2023-03-31 08:22:23 -04:00
Brad King
fb37de96a0 Merge topic 'remove-FindPythonInterp-FindPythonLibs'
a4c5b91f80 FindPython{Interp,Libs}: Add policy to remove these modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8380
2023-03-31 08:08:18 -04:00
Brad King
be3c564f8c Merge topic 'binutils-strip-macos'
ac2562afb3 BinUtils: Avoid llvm-strip on Apple platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8372
2023-03-31 08:01:16 -04:00
Brad King
a4c5b91f80 FindPython{Interp,Libs}: Add policy to remove these modules
The `FindPythonInterp` and `FindPythonLibs` modules have been deprecated
since CMake 3.12.  Add a policy to pretend they do not exist in order to
encourage projects to port to `FindPython` or `FindPython{2,3}`.
2023-03-30 12:05:09 -04:00
Brad King
1d1ee2b049 Merge topic 'ci-FindHDF5'
d38c752de2 ci: Enable FindHDF5 tests on Linux builds
28c4945a8a ci: Add HDF5 to Debian and Fedora base images
ad9e151045 Tests: Add cases covering FindHDF5 variables and imported targets
0e87e6c1a4 Tests: Add FindMPI test environment modification option
ee075a53c8 FindHDF5: Record compiler wrapper checks to configure log
72915b1068 FindHDF5: Fix compiler wrapper checks with spaces in path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8378
2023-03-30 07:22:17 -04:00
Brad King
ac2562afb3 BinUtils: Avoid llvm-strip on Apple platforms
Since commit cf82300a63 (BinUtils: Clarify search logic and make it more
consistent, 2021-05-27, v3.21.0-rc1~119^2~2) we prefer `llvm-strip` over
`strip` when using Clang.  However, `llvm-strip` seems to produce
unusable binaries in cases involving chained fixups.  Prefer Apple's
`strip` over `llvm-strip` on `APPLE` platforms.

We still need to consider `llvm-strip` as a fallback as explained for
`llvm-ar` by commit fee36b7a78 (BinUtils: Restore llvm-ar fallback on
Apple platforms, 2022-03-15, v3.23.0-rc4~12^2).

Issue: #24601
2023-03-30 07:14:07 -04:00
Brad King
2f3ba93102 Merge topic 'FindOpenAL-framework'
f05bd762f5 ci: Enable FindOpenAL test on macOS jobs
1d06554fc6 Tests: Fix FindOpenAL test for macOS framework
5f5476ee31 FindOpenAL: Fix imported target for macOS framework

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8373
2023-03-30 06:57:10 -04:00
Brad King
ee075a53c8 FindHDF5: Record compiler wrapper checks to configure log 2023-03-29 17:18:29 -04:00
Brad King
72915b1068 FindHDF5: Fix compiler wrapper checks with spaces in path
Some HDF5 compiler wrappers do not support source file paths that
contain spaces.  Pass source files to them using a file name in the
current working directory to avoid spaces.
2023-03-29 17:18:29 -04:00
nega
5f5476ee31 FindOpenAL: Fix imported target for macOS framework
If a framework is found, specify it through `INTERFACE_LINK_LIBRARIES`
because `IMPORTED_LOCATION` requires a file and not a framework
directory.
2023-03-29 13:31:48 -04:00
Brad King
d79237a580 Merge topic 'swift-old-driver'
006e1995eb Swift: Restore compatibility with old C++ driver

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8365
2023-03-29 09:13:33 -04:00
YR Chen
006e1995eb Swift: Restore compatibility with old C++ driver
The `-wmo` flag added by commit 6063428de7 (Swift: Update default build
flags, 2022-10-03, v3.26.0-rc1~585^2~1) behaves differently with the old
driver.  Detect when the old driver is being used, and avoid adding that
flag.

Fixes: #24641
2023-03-28 10:02:05 -04:00
Brad King
3beeca8e36 Merge topic 'FindPython-Windows-ARM'
9913c28ebb FindPython: Add Windows/ARM support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: David Lechner <david@lechnology.com>
Merge-request: !8354
2023-03-28 08:15:14 -04:00
Brad King
2deb22e160 Merge topic 'crosscompiling-warn-reset'
4d23636694 Warn if CMAKE_CROSSCOMPILING is true without CMAKE_SYSTEM_NAME set

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8358
2023-03-27 09:53:53 -04:00
Marc Chevrier
9913c28ebb FindPython: Add Windows/ARM support
Fixes: #24587
2023-03-26 10:58:12 +02:00
Martin Storsjö
4d23636694 Warn if CMAKE_CROSSCOMPILING is true without CMAKE_SYSTEM_NAME set
Also clarify the `CMAKE_CROSSCOMPILING` documentation to state that
CMake sets the variable automatically.
2023-03-24 11:57:01 -04:00
Brad King
3a9613d28f Merge topic 'ibmclang-aix-thin-lto'
79622d4a3e IBMClang: No thin LTO on AIX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Rob Boehne <robb@datalogics.com>
Merge-request: !8357
2023-03-24 09:36:45 -04:00
Nicole Rabjohn
79622d4a3e IBMClang: No thin LTO on AIX
AIX does not yet support thin LTO.
2023-03-23 11:46:17 -04:00
Brad King
7ef184f726 Merge topic 'FindHDF5-CXX-without-C'
a6bb4975ab FindHDF5: Restore parallel HDF5 detection with only CXX enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8355
2023-03-23 08:42:54 -04:00
Brad King
a6bb4975ab FindHDF5: Restore parallel HDF5 detection with only CXX enabled
Since commit 14c46fb16a (FindHDF5: Find C component with only CXX
compiler, 2022-12-13, v3.26.0-rc1~175^2), if CXX is enabled but C is
not, the `_HDF5_test_regular_compiler_C` helper writes a `.cpp` source
but the `_HDF5_invoke_compiler` still expects a `.c` source.  Refactor
the logic to select a name for the source file up front, and use it in
both helpers.

Fixes: #24627
Issue: #24241
2023-03-22 11:50:18 -04:00
Brad King
fb767b8910 Merge topic 'FindCUDATooklit-mark-as-advanced'
9be0063d98 FindCUDAToolkit: mark a few variables as advanced

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !8343
2023-03-21 09:03:24 -04:00
Brad King
ca8c171021 Merge topic 'clang-windows-cxx-modules'
1b7c26da49 Ninja: Wrap rules using '>' shell redirection with 'cmd /C' on Windows
ffd8537acf Clang: Record Clang 16.0 C++ modules flags only for GNU-like front-end
6013227230 cmGlobalNinjaGenerator: Use forward slashes in clang modmap format on Windows
d9d74b5e8a cmDyndepCollation: Drop outdated mentions of CXX_MODULE_INTERNAL_PARTITIONS
edab56d29a cmLocalNinjaGenerator: De-duplicate condition for using 'cmd /C' on Windows
8ebe3f92b3 cmGlobalNinjaGenerator: Detect GNU-like command-line for dyndep collator
f3ca199c9b cmGlobalNinjaGenerator: Factor out GNU-like command-line detection on Windows
f79817fcf0 cmCxxModuleMapper: Use value semantics in path conversion callback
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8346
2023-03-21 08:58:43 -04:00
Brad King
15a86d45d1 Merge topic 'clang-windows-cxx-modules' into release-3.26
1b7c26da49 Ninja: Wrap rules using '>' shell redirection with 'cmd /C' on Windows
ffd8537acf Clang: Record Clang 16.0 C++ modules flags only for GNU-like front-end
6013227230 cmGlobalNinjaGenerator: Use forward slashes in clang modmap format on Windows
d9d74b5e8a cmDyndepCollation: Drop outdated mentions of CXX_MODULE_INTERNAL_PARTITIONS
edab56d29a cmLocalNinjaGenerator: De-duplicate condition for using 'cmd /C' on Windows
8ebe3f92b3 cmGlobalNinjaGenerator: Detect GNU-like command-line for dyndep collator
f3ca199c9b cmGlobalNinjaGenerator: Factor out GNU-like command-line detection on Windows
f79817fcf0 cmCxxModuleMapper: Use value semantics in path conversion callback
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8346
2023-03-21 08:58:42 -04:00
Brad King
2cdb0bae28 Merge topic 'clang-cl-showIncludes'
843fc607de Ninja: Restore detection of clang-cl showIncludes prefix
3346570ae9 Tests: Comment RunCMake.Ninja ShowIncludes sample input languages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8344
2023-03-21 08:57:35 -04:00
Brad King
90d90a5d91 Merge topic 'clang-cl-showIncludes' into release-3.26
843fc607de Ninja: Restore detection of clang-cl showIncludes prefix
3346570ae9 Tests: Comment RunCMake.Ninja ShowIncludes sample input languages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8344
2023-03-21 08:57:34 -04:00
Brad King
4b9bf10c4d Merge topic 'FindPython-SOSABI-handling'
8a71c88d4d Merge branch 'backport-3.26-FindPython-SOSABI-handling'
4c902d675b FindPython: ensure Stable ABI is correctly handled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8345
2023-03-21 08:56:07 -04:00
Brad King
ffd8537acf Clang: Record Clang 16.0 C++ modules flags only for GNU-like front-end
The settings added by commit 3fe8e33f27 (Clang: Record Clang 16.0 flags
for our experimental C++ modules support, 2023-03-03, v3.26.0-rc6~6^2)
work only for the GNU-like `clang++` front-end, and not for the
MSVC-like `clang-cl` on Windows.

Also quote the path to `clang-scan-deps` to support spaces in its path.

Issue: #24611
2023-03-20 13:13:08 -04:00
YR Chen
843fc607de Ninja: Restore detection of clang-cl showIncludes prefix
Since commit 8f82e755f3 (Ninja: Fix detection of MSVC showIncludes
prefix in Italian, 2023-01-26, v3.26.0-rc1~20^2) our regex no longer
matches the output from `clang-cl`, which uses a relative path, forward
slashes, and is always in English [1]:

    Note: including file: ./foo.h

Update the regex to match that too.

[1] https://github.com/llvm/llvm-project/blob/llvmorg-16.0.0/clang/lib/Frontend/HeaderIncludeGen.cpp#L102

Co-authored-by: Brad King <brad.king@kitware.com>
2023-03-20 10:08:25 -04:00
Brad King
8a71c88d4d Merge branch 'backport-3.26-FindPython-SOSABI-handling' 2023-03-20 08:11:56 -04:00
Marc Chevrier
4c902d675b FindPython: ensure Stable ABI is correctly handled
Fixes: #24610
2023-03-20 08:10:53 -04:00
Brad King
301279e4a9 Help: Replace link with its permanent redirect 2023-03-18 08:46:12 -04:00