31 May
2021
31 May
'21
5:07 p.m.
Julien Blanc wrote:
Now there is the special case of Visual Studio, where the build system, the project manager and the compiler are so tied together that it makes it really hard to use the VS build system to compile using any other compiler, and vice-versa.
You can't use arbitrary compiles with MS Build, but you can choose a toolset with -T. This is the same functionality that can be accessed from the IDE, in Project Properties > Platform Toolset. E.g. -T v140 selects msvc-14.0 and -T clang-cl selects, well, clang-cl (at least in principle - for some reason it have stopped working for me, and neither does -T llvm. Might be because I'm using the clang-cl installed by Visual Studio and not the one from llvm.org.)