So I have installed the Clang tools on Visual Studio on Windows, and this lets me use the Clang compiler in Visual Studio. In my CMake I set the toolchain argument to ‘ClangCL’ and it sets it up conveniently in the Visual Studio solution. The issue is that, being the Clang compiler I thought I can pass it Clang compiler flags, for example:
-j4
To use 4 threads to compile. However I get a warning when compiling saying that it’s not recognised. Then I noticed when I configure my CMake:
Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
The CXX compiler identification is Clang 17.0.3 with MSVC-like command-line
The C compiler identification is Clang 17.0.3 with MSVC-like command-line
So I guess this is why it’s not recognising that flag, or I guess any of the Clang flags? What does it mean MSVC-like command line? Does that mean I can’t use the ordinary Clang flags? Which ones am I supposed to use? How is it that this even works? Suppose I’m meant to pass MSVC flags to it, it’s the Clang compiler, how does it recognise those flags? What in heck is going on?
10