[CMake] Using Clang + Ninja on Windows?

Edward Diener eldlistmailingz at tropicsoft.com
Fri Apr 22 18:47:11 EDT 2016


On 4/22/2016 4:51 AM, Mueller-Roemer, Johannes Sebastian wrote:
> It is true that there is no official bundled installer with both, but
> the official installer works just fine with mingw as long as you pass in
> the correct target to clang(++)
>
> For example
>
> clang++ --target=x86_64-w64-mingw32 test.cpp
>
> However, it assumes that mingw64 is installed under C:/mingw64 (the
> default location, it’ll work with a junction point though).

As of clang 3.7 there is no need to have a hardcoded mingw directory. 
You just need to have an appropriate mingw(-64)/gcc in your PATH. Also 
all distributed versions of clang 3.4 through 3.7 for Windows default to 
targeting mingw(-64)/gcc and not VC++. Only with 3.8 is the Windows 
release defaulting to targeting VC++.




More information about the CMake mailing list