Commit Graph

60983 Commits

Author SHA1 Message Date
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
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
bf6131fc9a Merge topic 'FindPython-SOSABI-handling' into release-3.26
4c902d675b FindPython: ensure Stable ABI is correctly handled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8345
2023-03-21 08:56:06 -04:00
Brad King
1b7c26da49 Ninja: Wrap rules using '>' shell redirection with 'cmd /C' on Windows
This is needed for the clang-scan-deps rule added by commit 0e21e55fc5
(Clang: Record Clang 16.0 C++ modules flags only for GNU-like front-end,
2023-03-16).

Fixes: #24611
2023-03-20 13:13:30 -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
3346570ae9 Tests: Comment RunCMake.Ninja ShowIncludes sample input languages 2023-03-20 10:05:57 -04:00
Marc Chevrier
4c902d675b FindPython: ensure Stable ABI is correctly handled
Fixes: #24610
2023-03-20 08:10:53 -04:00
Brad King
6013227230 cmGlobalNinjaGenerator: Use forward slashes in clang modmap format on Windows
Issue: #24611
2023-03-18 11:52:42 -04:00
Brad King
d9d74b5e8a cmDyndepCollation: Drop outdated mentions of CXX_MODULE_INTERNAL_PARTITIONS
These were left from an older design iteration in which, for MSVC, we
needed to distinguish `cl -internalPartition` from `cl -interface`
before scanning.  It is no longer needed since `cl -scanDependencies`
was updated to use the standard-conforming interpretation of
non-exported module partition syntax.

Issue: #24611
2023-03-18 11:52:42 -04:00
Brad King
edab56d29a cmLocalNinjaGenerator: De-duplicate condition for using 'cmd /C' on Windows 2023-03-18 11:52:41 -04:00