Commit Graph

58146 Commits

Author SHA1 Message Date
Brad King
d697bbd03d Merge branch 'release-3.23' into release-3.24 2022-11-01 10:40:34 -04:00
Brad King
91ccfa3302 CMake 3.23.5 v3.23.5 2022-11-01 09:36:33 -04:00
Brad King
ae917dc682 Merge branch 'cpack-trace-argument' into release-3.24
Merge-request: !7824
2022-10-27 09:25:24 -04:00
Brad King
77e4042204 Merge branch 'vswhere-support-x86' into release-3.24
Merge-request: !7832
2022-10-27 09:25:08 -04:00
Brad King
93a54db04e Merge branch 'release-3.23' into release-3.24 2022-10-27 09:25:02 -04:00
Brad King
e677cc421d Merge branch 'ninja-intl-paths' into release-3.24
Merge-request: !7833
2022-10-27 09:24:46 -04:00
Brad King
cd5826ffc9 Merge branch 'ninja-intl-paths' into release-3.23
Merge-request: !7833
2022-10-27 09:24:29 -04:00
Brad King
a12050666c Tests: Add case for ninja with non-ascii chars
Issue: #24089
2022-10-26 15:25:45 -04:00
Brad King
02a04dd9c7 Ninja: Restore support for non-ascii paths on Windows with ninja<=1.10
Revert commit bbdb000c55 (GlobalNinjaGenerator: enlarge file stream
buffer, 2022-01-25, v3.23.0-rc1~68^2).  Somehow `rdbuf()->pubsetbuf()`
is resetting our imbued locale and `cm_codecvt` that handles encoding.

Fixes: #24089
2022-10-26 15:24:43 -04:00
Brad King
6eee8c9000 VS: Fix crash finding vswhere on 32-bit Windows
Since commit f85913fa08 (VS: Add support for enumerating VS instances
with vswhere, 2022-04-11, v3.24.0-rc1~282^2), if the COM lookup does not
report any VS instances, we fall back to finding vswhere.  However, the
`getenv` call returns nullptr if the `ProgramFiles(x86)` environment
variable is not set.  Update the logic to tolerate not-set environment
variables.  Also check the plain `ProgramFiles` environment variable.

Fixes: #24090
2022-10-26 11:12:46 -04:00
Brad King
85191f65d2 Merge branch 'release-3.23' into release-3.24 2022-10-25 10:35:42 -04:00
Brad King
6f2e8bace1 Merge branch 'try_compile-CMP0128' into release-3.24
Merge-request: !7821
2022-10-25 10:35:30 -04:00
Kyle Edwards
b5ebaa0d9c CPack: Require no argument for --trace and --trace-expand
This was accidentally broken by commit 87c762d435 (CPack: Use
cmCommandLineArgument instead of cmsys::CommandLineArguments,
2022-04-18, v3.24.0-rc1~258^2).

Fixes: #24085
2022-10-25 10:11:20 -04:00
Brad King
f58d714f5e Merge branch 'flang-windows' into release-3.24
Merge-request: !7818
2022-10-24 12:54:01 -04:00
مهدي شينون (Mehdi Chinoune)
166bc00399 LLVMFlang: Add a required line to define linking rules on Windows
This was missed in commit d34e5a98b8 (LLVMFlang: Add support for
Windows, 2022-09-18, v3.25.0-rc1~102^2).
2022-10-24 12:53:07 -04:00
Brad King
4f2bb02d9a Merge branch 'try_compile-CMP0128' into release-3.23
Merge-request: !7821
2022-10-24 12:30:24 -04:00
Brad King
90287792b6 Tests: Avoid running C++11 test on GNU < 4.7
The test added in commit 50e90e2828 (try_compile: Honor CMP0128 setting
in test project, 2022-10-18, v3.25.0-rc2~4^2) requires that the compiler
support C++11 mode, so do not run it on GNU compilers that are too old.
2022-10-24 12:04:57 -04:00
Brad King
b6ddcbc7ec Merge branch 'release-3.23' into release-3.24 2022-10-21 10:11:37 -04:00
Brad King
47063db58d Merge branch 'filesystem-path-c++03-abi' into release-3.24
Merge-request: !7813
2022-10-20 19:03:52 -04:00
Brad King
199b3e580d Merge branch 'filesystem-path-c++03-abi' into release-3.23
Merge-request: !7813
2022-10-20 19:03:19 -04:00
Brad King
ee9805ccd1 cm/filesystem: Fix crash with pre-C++11 std::string GNU ABI in C++17
The `remove_filename` and `replace_extension` methods compute an offset
between the whole path in a `std::string` and a part of a path in a
`std::string_view`.  This is done by subtracting their `.data()`
pointers.  However, C++17 adds a non-const `.data()` through which
modification of the string is allowed.  This means the copy-on-write
implementation used by the pre-C++11 std::string GNU ABI must reallocate
if the string has been copied.  Our subtraction then computes an offset
between two different allocations, which is undefined behavior.

The workaround in commit b3ca4f9ad1 (cm/filesystem: Work around crash
when compiled for CYGWIN/MSYS runtime, 2021-04-22, v3.21.0-rc1~271^2~2)
avoided the problem by calling the non-const `.data()` to reallocate
before constructing the `string_view`.  Instead, explicitly call the
const `.data()` method on the string, which does not reallocate.

Fixes: #22090, #23328
2022-10-20 18:31:50 -04:00
Brad King
81ebea445d Merge branch 'test-git-protocol-file' into release-3.24
Merge-request: !7812
2022-10-20 13:47:08 -04:00
Brad King
79ce0f434e Tests: Explicitly allow usage of git file-based protocol in test cases
Due to CVE-2022-39253, Git 2.30.6 sets `protocol.file.allow=user` by
default.  The change has also been backported to other Git versions by
distros.  This breaks some of our test cases that use the file-based
protocol locally to simulate real workflows without requiring network
access.  In these cases the file protocol is safe, so explicitly enable
it in the tests.
2022-10-20 13:45:01 -04:00
Brad King
589aa44952 Merge branch 'release-3.23' into release-3.24 2022-10-19 09:58:01 -04:00
Brad King
588c9c4145 Merge branch 'try_compile-CMP0128' into release-3.24
Merge-request: !7803
2022-10-18 14:25:52 -04:00
Brad King
96172ba2d1 Merge branch 'try_compile-CMP0128' into release-3.23
Merge-request: !7803
2022-10-18 14:25:26 -04:00
Brad King
263d733a58 Merge branch 'android-path-suffixes' into release-3.24
Merge-request: !7805
2022-10-18 14:22:17 -04:00
Sergiu Deitsch
7e5b48a7b1 Android: Avoid searching API level directories matching architecture bitness
When cross-compiling for Android, the library path suffixes `/<number>/`
refer to API level specific platform libraries instead of architecture
bitness. Disable path suffix use under NDK to avoid incorrect inclusion
of API level specific libraries below the targeted API level.

Fixes: #23830
2022-10-18 14:21:51 -04:00
Brad King
50e90e2828 try_compile: Honor CMP0128 setting in test project
Some projects pass a raw `-std=` flag to the compiler in the
`try_compile` project.  If they do not set CMP0128 to NEW,
we should not append a `-std=` flag where we did not before
the policy was added.

Fixes: #24063
2022-10-18 13:38:00 -04:00
Brad King
9fefa9ef49 Merge branch 'FindJNI-android-api' into release-3.24
Merge-request: !7801
2022-10-17 15:53:41 -04:00
Sergiu Deitsch
c833df0924 FindJNI: replace CMAKE_ANDROID_API by CMAKE_SYSTEM_VERSION
In commit 00c4f488f2 (FindJNI: support Android NDK, 2022-03-18,
v3.24.0-rc1~325^2) we used `CMAKE_ANDROID_API` to check the Android API
level.  However, `CMAKE_SYSTEM_VERSION` is the authoritative value.

When cross-compiling for Android, an unset `CMAKE_ANDROID_API` can
result in failure to locate JNI because the `NativeHelper` component
cannot be found. In this case, the component is falsely assumed to be
available by default (and thus required) since the comparison against an
unset `CMAKE_ANDROID_API` variable evaluates to true.  Use
`CMAKE_SYSTEM_VERSION` to determine the Android API level instead.

Issue: #23830
2022-10-17 15:51:10 -04:00
Brad King
06294a1945 Merge branch 'release-3.23' into release-3.24 2022-10-17 10:01:52 -04:00
Brad King
7780588d82 Merge branch 'doc-timestamp-f' into release-3.24
Merge-request: !7796
2022-10-14 11:33:14 -04:00
Brad King
367f10f4cb Merge branch 'doc-timestamp-f' into release-3.23
Merge-request: !7796
2022-10-14 11:32:49 -04:00
Brad King
7d25ae7350 Help: Add versionadded for string(TIMESTAMP) %f specifier
This was accidentally left out of commit c050d6a01e (string(TIMESTAMP):
add %f specifier for microseconds, 2022-01-27, v3.23.0-rc1~59^2).
2022-10-14 11:28:38 -04:00
Brad King
76f13bcee0 Merge branch 'flang-implicit-link-info' into release-3.24
Merge-request: !7781
2022-10-11 16:17:23 -04:00
Brad King
0301779e85 LLVMFlang: Add support for mixed-language linking with Fortran
Parse implicit link information for this compiler to support
mixed-language linking.  This was missed by commit 85749766df
(LLVMFlang: Add support for LLVM Flang, 2021-07-07, v3.24.0-rc1~86^2).
Also activate mixed-language test cases that would have caught this.

Issue: #22387
2022-10-11 15:38:48 -04:00
Brad King
5d24e9e09b Merge branch 'release-3.23' into release-3.24 2022-10-11 09:49:59 -04:00
Brad King
eec8a7b681 Merge branch 'cpack-nsis-uninstaller' into release-3.24
Merge-request: !7774
2022-10-11 09:49:50 -04:00
Brad King
d82e2d557e Merge branch 'cpack-nsis-uninstaller' into release-3.23
Merge-request: !7774
2022-10-10 10:43:41 -04:00
Mika Fischer
8721658959 CPack/NSIS: Fix installer not waiting for uninstaller to finish
In commit b795c96727 (CPack/NSIS: Fix uninstall command when run from
installer, 2022-03-21, v3.23.0-rc5~9^2~1) we incorrectly removed the
`_?` parameter when calling the uninstaller during installation.
This parameter is however essential for ExecWait to actually wait for
the uninstaller to finish.  Without it, the uninstaller is started in
the background and installer and uninstaller run at the same time.

See https://nsis.sourceforge.io/Docs/Chapter3.html#installerusageuninstaller

Add back the `_?` parameter to fix this regression.  Use another
approach to solve the problem motivating the original change.

Fixes: #24041
2022-10-10 10:41:45 -04:00
Brad King
db53376b1f Merge topic 'add_cuda_11.8_new_archs' into release-3.24
7f4cbf6594 CUDA: Add support for the two new architectures in 11.8

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7761
2022-10-10 09:50:51 -04:00
Brad King
1aa7351f43 Merge topic 'Intel-Fortran-warn-errors' into release-3.24
13f3382b1c Intel/IntelLLVM: Fortran has distinct "-Werror"-like flag
ab8a0a106e COMPILE_WARNING_AS_ERROR: Fix internal formatting of options table

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7758
2022-10-10 09:49:45 -04:00
Robert Maynard
7f4cbf6594 CUDA: Add support for the two new architectures in 11.8
CUDA 11.8 introduces ada ( 89 ), and hopper ( 90 ).
2022-10-07 15:58:53 -04:00
Michael Hirsch
13f3382b1c Intel/IntelLLVM: Fortran has distinct "-Werror"-like flag
Update the compiler options table added by commit 76a08cd253
(COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errors,
2022-04-21, v3.24.0-rc1~173^2) to use the Intel Fortran compilers'
dedicated `-warn*` flags.
2022-10-07 10:05:49 -04:00
Brad King
ab8a0a106e COMPILE_WARNING_AS_ERROR: Fix internal formatting of options table
In commit 76a08cd253 (COMPILE_WARNING_AS_ERROR: Add options to treat
warnings as errors, 2022-04-21, v3.24.0-rc1~173^2) we formatted the
options table entries as command-line string fragments.  Since they are
part of the `CMAKE_${lang}_COMPILE_OPTIONS_*` tables, they should be
formatted as `;`-separated lists of compiler options.
2022-10-07 10:05:21 -04:00
Brad King
b18a86051e Merge topic 'ifw-4.4' into release-3.24
e848ce21c9 CPack/IFW: Add support for QtIFW 4.4

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7750
2022-10-06 08:41:49 -04:00
Erlend E. Aasland
e848ce21c9 CPack/IFW: Add support for QtIFW 4.4
Fixes: #24027
2022-10-05 15:48:08 -04:00
Brad King
8cadea4f47 Merge branch 'release-3.23' into release-3.24 2022-10-04 14:23:00 -04:00
Brad King
34a6da34b8 CMake 3.23.4 v3.23.4 2022-10-04 13:26:33 -04:00