]> 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)
committerJia Tan <jiat0218@gmail.com>
Tue, 31 Oct 2023 10:44:59 +0000 (18:44 +0800)
commit38171492ded6426ddf53d0c200fa8c93fcd02a60
treef1bbc40e86f2c5c3b4b5b70f3e6c5c6aa9f4dae6
parent1bce6fe48334b5df33d0487a9cbe41950122230e
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
CMakeLists.txt