Commit Graph

58167 Commits

Author SHA1 Message Date
Brad King
33cf87619b Merge branch 'test-git-local-defaultBranch' into release-3.24
Merge-request: !8060
2023-01-11 17:13:40 -05:00
Brad King
baa8597076 Tests: Fix CTest.UpdateGIT under repo-local defaultBranch config
The default branch detection added by commit 26ec2e2b0c (Tests: Update
CTest.UpdateGIT test for custom defaultBranch, 2020-12-02,
v3.20.0-rc1~355^2) fails if the test is run inside a Git work tree whose
`.git` directory configures a `defaultBranch` that is different from the
global or system-wide value.  Fix the detection to ignore the locally
configured value so that we match the `git init` decision.
2023-01-11 17:11:34 -05:00
Brad King
bf7ff59292 Merge branch 'ci-xcode-14.2' into release-3.24
Merge-request: !8023
2022-12-16 08:49:05 -05:00
Brad King
85d2ce0bfe gitlab-ci: update macOS jobs to use Xcode 14.2 2022-12-15 17:43:58 -05:00
Brad King
9c29d00393 Merge branch 'rel-win-sign-digest' into release-3.24
Merge-request: !7970
2022-11-30 09:58:26 -05:00
Brad King
870f30aacc Utilities/Release: Use explicit digest for Win7-compatible signature
Otherwise `signtool` warns.
2022-11-30 09:16:22 -05:00
Brad King
0674870892 Merge branch 'mingw-windres' into release-3.24
Merge-request: !7964
2022-11-28 19:10:20 -05:00
Brad King
b47092fddb MinGW: Fix regression when windres is not found
The fix in commit e9755bc7c1 (MinGW: Restore using windres when
toolchain-prefixed name is not available, 2022-08-15, v3.24.1~4^2)
incorrectly listed two entries in `CMAKE_RC_COMPILER_INIT`, which is
only meant to have one value.  Revise the logic to support multiple
platform-specific names for the Windows Resource Compiler while still
only using one name as the fallback when it is not found.

Fixes: #24190
Issue: #23841
2022-11-28 19:09:04 -05:00
Brad King
daa2fc5833 Merge branch 'test-FindBoost-python-versions' into release-3.24
Merge-request: !7929
2022-11-17 08:06:36 -05:00
Brad King
6b1f933cb8 Tests: Update FindBoost.TestPython for Python 3.11 and 3.12
Follow up the python 3.11 and 3.12 support from:

* commit 43844c5d82 (FindPython: Add support for Python 3.11,
                     2021-12-07, v3.22.2~20^2)
* commit ca2877c039 (FindPython: add support for Python 3.12,
                     2022-05-11, v3.23.2~15^2)

with an update for the FindBoost test.
2022-11-16 14:34:07 -05:00
Brad King
8ad8c4432f Merge branch 'release-3.23' into release-3.24 2022-11-14 12:17:21 -05:00
Brad King
3e0ccd6469 Merge branch 'compile-msvc-14.34-c++20' into release-3.24
Merge-request: !7910
2022-11-14 12:16:46 -05:00
Brad King
2ac207f046 Merge branch 'compile-msvc-14.34-c++20' into release-3.23
Merge-request: !7910
2022-11-14 12:16:27 -05:00
Werner, Joerg
a394c9416d cmGlobalVisualStudioGenerator: Fix compiling as C++20 in VS 2022
Adding missing narrow string conversion.

This backports commit f3c918ef1b (cmGlobalVisualStudioGenerator: Fix
compiling as C++20 in VS 2022, 2022-10-20, v3.25.0-rc3~31^2) to the
CMake 3.23 and 3.24 branches.

Fixes: #24162
2022-11-14 12:07:16 -05:00
Brad King
0325f04762 Merge branch 'expat-c-no-extensions' into release-3.24
Merge-request: !7899
2022-11-10 16:07:14 -05:00
Raul Tambre
019af62294 expat: Activate POSIX APIs even without compiler extensions
Compile with the preprocessor definitions necessary for the `arc4random`
family so it's available even when compiler extensions are not enabled.
Similar things are done in cmbzip2, cmcurl, cmlibarchive, cmliblizma and
cmlibuv.

This issue surfaced on a nightly bot after glibc 2.36 added arc4random
functions. cmlibarchive defines the necessary macro, but also relies on
`HAVE_ARC4RANDOM_BUF`.  cmlibarchive's check with the necessary macro
defined was skipped due to cmexpat running the same check before, but
without the macros, and it being cached.

This extends commit c7c3e39e4f (Utilities: Activate POSIX APIs even
without compiler extensions, 2022-06-02, v3.24.0-rc1~34^2) to cover our
build of expat too.

Issue: #20454
2022-11-10 16:04:38 -05:00
Brad King
2780c3c683 Merge branch 'ci-xcode-14.1' into release-3.24
Merge-request: !7863
2022-11-03 12:02:05 -04:00
Brad King
0d3d687067 gitlab-ci: update macOS jobs to use Xcode 14.1 2022-11-03 11:58:31 -04:00
Sean McBride
9684a589ca Source: Replace uses of sprintf with safer snprintf in CMake 3.24 branch
Backport commit d5694e4623 (Source: Replace uses of sprintf with safer
snprintf, 2022-06-17, v3.25.0-rc1~587^2) to the CMake 3.24 branch. This
is needed to compile without warnings using Xcode 14.1's macOS 13.0 SDK.
2022-11-03 11:58:31 -04:00
Brad King
eea23d21a3 Source: Tell Git not to check whitespace in third-party curses form code 2022-11-03 11:58:30 -04:00
Brad King
c974557598 CMake 3.24.3 v3.24.3 2022-11-01 10:55:49 -04:00
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