]> git.ipfire.org Git - thirdparty/xz.git/commit
CMake: Fix Windows build with Clang/LLVM 17.
authorLasse Collin <lasse.collin@tukaani.org>
Wed, 27 Sep 2023 16:54:35 +0000 (19:54 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Tue, 7 May 2024 13:11:57 +0000 (16:11 +0300)
commit4847e40d4b83cdb902a7d8f32019e962640b8825
treeb200cc379835373522a4402066b9d7a45cbe57e7
parentf3449507ad05094a32d957ca4649954fb07d3a7a
CMake: Fix Windows build with Clang/LLVM 17.

llvm-windres 17.0.0 has more accurate emulation of GNU windres, so
the hack for GNU windres must now be used with llvm-windres too.

LLVM 16.0.6 has the old behavior and there likely won't be more
16.x releases. So we can simply check for >= 17.0.0.

The workaround must not be used with Clang that is acting in
MSVC mode. This checks for the known environments that need
the workaround instead of using "NOT MSVC".

See also:
https://github.com/llvm/llvm-project/commit/2bcc0fdc58a220cb9921b47ec8a32c85f2511a47

(cherry picked from commit 38171492ded6426ddf53d0c200fa8c93fcd02a60)
CMakeLists.txt