]> git.ipfire.org Git - thirdparty/json-c.git/commit
bug: Fixing Cmake build when using clang-cl 898/head
authorTyler Erickson <tyler.erickson@seagate.com>
Mon, 20 Oct 2025 17:39:04 +0000 (11:39 -0600)
committerTyler Erickson <tyler.erickson@seagate.com>
Mon, 20 Oct 2025 17:39:04 +0000 (11:39 -0600)
commit461d9f90c41b90aaa01a0405aabc86c4947fc0fb
tree09efe19f0f93e19ae04fc785ce6abe280a606370
parent2372e9518e6ba95b48d37ec162bc7d93b297b52f
bug: Fixing Cmake build when using clang-cl

Clang-cl will fail to build and produce warnings about redefining existing symbols, mostly for float.h and math.h compatibility.

To resolve this, this moves the clang-cl detection earlier in the CMakeLists.txt so that CLANG_CL can be checked properly where there is an existing MSVC workaround for these symbols.
This resolves the build using the latest clang-cl from the LLVM clang repo as well as clang-cl that can be installed with MSVC 2022.

Signed-off-by: Tyler Erickson <tyler.erickson@seagate.com>
CMakeLists.txt