Commit Graph

60993 Commits

Author SHA1 Message Date
Brad King
fb3c4715cd Ninja: Restore detection of msvc-wine 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 `msvc-wine`, which uses forward slashes:

    Note: including file: /path/to/foo.h

`cl /showIncludes` under Wine prints paths of the form `Z:\path\to\file`,
but the `msvc-wine` wrapper converts them to the form `/path/to/file` so
that native Ninja can be used.  Update our regex to match the prefix
followed by a path with a leading forward slash.

Fixes: #24908
2023-05-15 15:34:55 -04:00
Brad King
822aa26915 Merge topic 'FindCUDAToolkit_more_library_root_detection' into release-3.26
587c0443cc FindCUDAToolkit: Support CUDA version extraction from version.json

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8451
2023-05-05 12:34:52 -04:00
Robert Maynard
587c0443cc FindCUDAToolkit: Support CUDA version extraction from version.json
Fixes: #24858
2023-05-04 12:26:04 -04:00
Brad King
5532fcb8f9 Merge topic 'findjni_new_ubuntu_versions' into release-3.26
7f738313e0 FindJNI: add Ubuntu specific paths for more recent JDK versions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8449
2023-05-02 08:39:51 -04:00
Even Rouault
7f738313e0 FindJNI: add Ubuntu specific paths for more recent JDK versions 2023-05-01 22:26:07 +02:00
Brad King
b548c7efa6 Merge topic 'FindCUDAToolkit-static-deps' into release-3.26
1d6c343661 FindCUDAToolkit: Add missing static library dependencies on pthread and libdl

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8422
2023-04-26 10:22:26 -04:00
Brad King
f0b45e6dbb Merge topic 'FindCUDAToolkit_nvrtc_windows_dependencies' into release-3.26
11a9f88bdf FindCUDAToolkit: Fix nvrtc_static dependencies on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8405
2023-04-26 10:21:12 -04:00
Robert Maynard
1d6c343661 FindCUDAToolkit: Add missing static library dependencies on pthread and libdl
Discourse-topic: https://discourse.cmake.org/t/7946
2023-04-26 10:19:59 -04:00
Robert Maynard
11a9f88bdf FindCUDAToolkit: Fix nvrtc_static dependencies on Windows
Required for CUDA toolkit 11.5:

* https://docs.nvidia.com/cuda/archive/11.5.0/nvrtc/index.html#build-instruction
2023-04-25 13:37:19 -04:00
Marc Chevrier
32c3dbbee8 Merge topic 'Help-CMP0105-clarifications' into release-3.26
afd40232fa Help: CMP0105 policy: clarifications

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8418
2023-04-17 05:15:58 -04:00
Marc Chevrier
afd40232fa Help: CMP0105 policy: clarifications 2023-04-15 10:11:22 +02:00
Brad King
35c8f504ae Merge topic 'doc-typo' into release-3.26
045fbbb47c Help: Remove duplicated word in COMPILE_OPTIONS target property docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8396
2023-04-06 09:06:43 -04:00
Brad King
038cd7f620 Merge topic 'FindCUDAToolkit-nvptxcompiler_static-deps' into release-3.26
8711231739 FindCUDAToolkit: nvptxcompiler_static correctly specify dependencies

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

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8397
2023-04-06 09:04:41 -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
Brad King
045fbbb47c Help: Remove duplicated word in COMPILE_OPTIONS target property docs
Fixes: #24673
2023-04-05 09:44:10 -04:00
Brad King
624461526f CMake 3.26.3 v3.26.3 2023-04-04 14:59:48 -04:00
Brad King
5a3a7abb9f Merge branch 'release-3.25' into release-3.26 2023-04-04 14:25:35 -04:00
Brad King
905b62c3c2 Merge branch 'release-3.24' into release-3.25 2023-04-04 14:24:58 -04:00
Brad King
dc6ef0d9f2 Merge branch 'release-3.23' into release-3.24 2023-04-04 14:24:50 -04:00
Brad King
87812bbcd9 Merge topic 'test-xcode-14.3' into release-3.26
3bb46b29fd Tests: Teach RunCMake to ignore Xcode DVTCoreDeviceEnabledState warnings

Merge-request: !8392
2023-04-04 13:04:05 -04:00
Brad King
9b828e045a Merge branch 'test-xcode-14.3' into release-3.25
Merge-request: !8392
2023-04-04 13:03:49 -04:00
Brad King
d27cff7ec4 Merge branch 'test-xcode-14.3' into release-3.24
Merge-request: !8392
2023-04-04 13:03:41 -04:00
Brad King
21f6ada301 Merge branch 'test-xcode-14.3' into release-3.23
Merge-request: !8392
2023-04-04 13:03:10 -04:00
Brad King
3bb46b29fd Tests: Teach RunCMake to ignore Xcode DVTCoreDeviceEnabledState warnings
On some Xcode versions, `xcodebuild` may warn:

    ... xcodebuild[...] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default

Teach RunCMake to drop such incidental lines before matching against
expected output.
2023-04-04 13:00:07 -04:00
Brad King
fca7e77bff Merge branch 'release-3.25' into release-3.26 2023-04-04 09:27:00 -04:00
Brad King
1dae4d9355 Merge branch 'release-3.24' into release-3.25 2023-04-04 09:26:46 -04:00
Brad King
741abe2540 Merge branch 'release-3.23' into release-3.24 2023-04-04 09:26:32 -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
636df83380 Merge branch 'swift-xcode-14.3' into release-3.25
Merge-request: !8388
2023-04-03 19:03:37 -04:00
Brad King
5db0c6cffc Merge branch 'swift-xcode-14.3' into release-3.24
Merge-request: !8388
2023-04-03 19:03:24 -04:00
Brad King
3b7809b769 Merge branch 'swift-xcode-14.3' into release-3.23
Merge-request: !8388
2023-04-03 19:02:56 -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
b5e972f629 Merge branch 'release-3.25' into release-3.26 2023-04-03 08:57:50 -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
46441e54c7 Merge branch 'vs-fortran-try_compile' into release-3.25
Merge-request: !8383
2023-03-31 08:51:07 -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
bef6a27531 CMake 3.26.2 v3.26.2 2023-03-29 14:19:57 -04:00
Brad King
0849598ff8 Merge topic 'swift-old-driver' into release-3.26
006e1995eb Swift: Restore compatibility with old C++ driver

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8365
2023-03-29 09:13:31 -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
fbe739ec61 Merge topic 'mingw-slashes' into release-3.26
a67cd9c39c Ninja: Restore slash style for MinGW tools when extra languages are enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8368
2023-03-28 08:11:08 -04:00
Brad King
a67cd9c39c Ninja: Restore slash style for MinGW tools when extra languages are enabled
Since commit f3ca199c9b (cmGlobalNinjaGenerator: Factor out GNU-like
command-line detection on Windows, 2023-03-18, v3.26.1~2^2~6), we
accidentally "unrecognize" MinGW tools on Windows if a language other
than C or CXX is enabled.  This causes the wrong slash style to be
generated in paths in `build.ninja`.

Fixes: #24642
2023-03-27 18:20:23 -04:00
Brad King
381327c944 Merge topic 'module-depends-static-lib-cycle' into release-3.26
01d7860fdb Ninja,Makefile: Restore Fortran module scanning in static library cycle
846baa7c5b cmGlobalGenerator: Factor out helper to check target ordering

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8363
2023-03-27 09:51:58 -04:00
Brad King
01d7860fdb Ninja,Makefile: Restore Fortran module scanning in static library cycle
Since

* commit eed295fd8a (cmGlobalNinjaGenerator: require that dependency info
                     files work, 2023-02-01, v3.26.0-rc1~1^2~1), and
* commit 13810dee17 (cmDependsFortran: require that dependency info files
                     work, 2023-02-01, v3.26.0-rc1~1^2),

the Ninja and Makefile generators' module dependency scanning requires
that scanning results from from linked targets is available before
scanning the current target.  In the case of a static library cycle,
we cannot expect this information from other static libraries in the
cycle.  Previously we supported cyclic cases at the cost of silently
ignoring missing information.

We already compute a global order of targets that respects all
`add_dependencies`, but may break `target_link_libraries` dependencies
that occur in a static library cycle.  Use this order to filter the
linked targets so we only expect scanning results to be available from
those targets that build before the current target.

This approach is sufficient to support module dependency scanning in
static library cycles as long as module dependencies do not cross
between two libraries in the same cycle.

Fixes: #24631
2023-03-24 15:57:52 -04:00
Brad King
846baa7c5b cmGlobalGenerator: Factor out helper to check target ordering 2023-03-24 15:57:52 -04:00
Brad King
fae6e8c2cd CMake 3.26.1 v3.26.1 2023-03-23 09:12:04 -04:00
Brad King
e133fe3c03 Merge topic 'FindHDF5-CXX-without-C' into release-3.26
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:53 -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
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