60955 Commits

Author SHA1 Message Date
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
Brad King
8ebe3f92b3 cmGlobalNinjaGenerator: Detect GNU-like command-line for dyndep collator
This will help the collator choose flags and path styles for modmap
files.
2023-03-18 11:52:41 -04:00
Brad King
f3ca199c9b cmGlobalNinjaGenerator: Factor out GNU-like command-line detection on Windows 2023-03-18 11:52:41 -04:00
Brad King
f79817fcf0 cmCxxModuleMapper: Use value semantics in path conversion callback
The call site already owns a path it doesn't need when the callback
returns.  Hand ownership to the callback so it can optionally mutate
the path without necessarily allocating.
2023-03-18 11:52:41 -04:00
Brad King
5ab002ea11 cmCxxModuleMapper: Remove redundant path conversion callbacks
Two calls to `PathForGenerator` were applied to values returned by
`BmiGeneratorPathForModule`, that already calls `PathForGenerator`.
2023-03-18 11:52:41 -04:00
Brad King
5e5a21aadd Merge topic 'CMakePackageConfigHelpers-ARCH_INDEPENDENT' into release-3.26
6988ddf8ac WriteBasicConfigVersionFile: Fix regression in ARCH_INDEPENDENT check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8337
2023-03-17 07:54:16 -04:00
Brad King
970af1ca5c Merge topic 'FindMatlab-R2023a' into release-3.26
58ab34d88a FindMatlab: add version/release map for R2023a

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8334
2023-03-17 07:46:53 -04:00
Brad King
6988ddf8ac WriteBasicConfigVersionFile: Fix regression in ARCH_INDEPENDENT check
Refactoring in commit 77982de955 (CMakePackageConfigHelpers: only emit
arch check if needed, 2023-01-29, v3.26.0-rc1~16^2) did not correctly
preserve the check for empty `CMAKE_SIZEOF_VOID_P`.  Fix it.

The difference between the version files generated before and after is:

    -if(CMAKE_SIZEOF_VOID_P STREQUAL "" OR "8" STREQUAL "")
    +if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")

This restores the check generated before the above-mentioned commit.

Fixes: #24608
2023-03-16 11:26:10 -04:00
scivision
58ab34d88a FindMatlab: add version/release map for R2023a 2023-03-16 11:08:05 -04:00
Brad King
6c71fa6d56 CMake 3.26.0 v3.26.0 2023-03-14 10:04:14 -04:00
Brad King
c2b1d9bf97 Merge topic 'revert-CheckCompilerFlag-clang-argument-unused' into release-3.26
97fcd3bd30 CheckCompilerFlag: Revert 'Match the Clang "argument unused" output ...'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8322
2023-03-14 09:29:00 -04:00
Brad King
97fcd3bd30 CheckCompilerFlag: Revert 'Match the Clang "argument unused" output ...'
Revert commit 5b45a3d0ce (CheckCompilerFlag: Match the Clang "argument
unused" output for all languages, 2023-01-23, v3.26.0-rc1~38^2).  It
broke existing projects that were silently tolerating unrelated unused
arguments in their checks for C and CXX.  For example, using
`CFLAGS=-nostdinc` or `CXXFLAGS=-nostdinc++` causes those flags to be
used when driving the linker as well, and Clang warns they are unused in
that case.

Add a test case covering the now-restored behavior.

Fixes: #24591
2023-03-13 16:18:50 -04:00
Brad King
bd74679ab5 Merge branch 'release-3.25' into release-3.26 2023-03-13 14:31:47 -04:00
Brad King
2644555536 Merge branch 'backport-3.25-log-failed-compiler-id' into release-3.25
Merge-request: !8320
2023-03-13 14:31:05 -04:00
Brad King
9f54901ed9 CompilerId: Restore logging of failed identifications in CMake 3.25
Changes in commit 9c5bd7fe3a (CompilerId: Output errors from all
attempts at detection, 2022-08-16, v3.25.0-rc1~290^2) accidentally
stopped logging failed compiler identification build output.

This was fixed for CMake 3.26 and later by commit 24ccc8c3c9
(CompilerId: Restore logging of failed identifications, 2023-01-16,
v3.26.0-rc1~70^2~6).  Backport it to 3.25.
2023-03-13 14:29:50 -04:00
Brad King
8e4c849441 Merge topic 'revert-optimize-target-depends-closure' into release-3.26
685108a582 Ninja: Revert "Optimize target depends closure" due to performance regression

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8315
2023-03-13 09:36:01 -04:00
Brad King
685108a582 Ninja: Revert "Optimize target depends closure" due to performance regression
Revert commit 1f16af01f4 (cmGlobalNinjaGenerator: Optimize target
depends closure, 2023-01-17, v3.26.0-rc1~74^2).  It regressed generation
time for some projects.  Revert it pending further investigation.
2023-03-10 15:13:23 -05:00
Brad King
454bfa77b2 CMake 3.26.0-rc6 v3.26.0-rc6 2023-03-08 14:04:09 -05:00
Brad King
3bb826359a Merge branch 'release-3.25' into release-3.26 2023-03-08 10:35:16 -05:00
Brad King
5709a7e572 CMake 3.25.3 v3.25.3 2023-03-08 10:01:06 -05:00
Brad King
db8be3b923 Merge branch 'release-3.25' into release-3.26 2023-03-08 09:50:39 -05:00
Brad King
9ee3e2cc7e Merge branch 'release-3.24' into release-3.25 2023-03-08 09:50:32 -05:00
Brad King
451d1c8b6c CMake 3.24.4 v3.24.4 2023-03-08 09:15:32 -05:00
Brad King
cea9dae92a Merge topic 'revert-vs-BuildInParallel' into release-3.26
abb1c12162 VS: Revert "Build custom commands concurrently when possible"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8297
2023-03-08 08:56:28 -05:00
Brad King
a7e697d5d2 Merge branch 'release-3.25' into release-3.26 2023-03-08 08:53:36 -05:00
Brad King
d7481673d2 Merge topic 'file-install-macos' into release-3.26
a6f5bdd650 Merge branch 'backport-3.24-file-install-macos'
35f2b1bf5b file(INSTALL): Fix file ownership regression when running as root on macOS
a5d6548587 file(INSTALL): Fix file ownership regression when running as root on macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8293
2023-03-08 08:52:08 -05:00
Brad King
84adf3e57f Merge branch 'release-3.24' into release-3.25 2023-03-08 07:45:25 -05:00
Brad King
24f356cd5e Merge branch 'backport-3.24-file-install-macos' into release-3.25
Merge-request: !8293
2023-03-08 07:45:15 -05:00
Brad King
a6373caaec Merge branch 'backport-3.24-file-install-macos' into release-3.24
Merge-request: !8293
2023-03-08 07:44:36 -05:00