Building with CMake, Ninja and Clang on Windows

Inspired by the “Ways to Compile with Clang on Windows” blog post from @Unspongeful and after some extended testing, the following command line worked for me (and yes, it’s one big command I just splitted into several lines for better readability): > cmake -E env LDFLAGS=”-fuse-ld=lld-link” PATH=”<path\to\ninja>” cmake -H. -G Ninja -Bbuild -DCMAKE_C_COMPILER:PATH=”%ProgramFiles(x86)%\LLVM\bin\clang.exe” -DCMAKE_CXX_COMPILER:PATH=”%ProgramFiles(x86)%\LLVM\bin\clang.exe” -DCMAKE_C_COMPILER_ID=”Clang” … Read more