How do I tell CMake to use Clang on Windows?
<p>I have a C++ project that builds using CMake. I usually build on OSX but now I am trying to get a Windows version working too. I would like to use Clang on Windows for compatibility reasons. </p>

<p>I installed the pre-compiled Clang 3.8 binary from LLVM: </p>

<pre><code>C:\Program Files\LLVM\bin\clang.exe
C:\Program Files\LLVM\bin\clang++.exe
</code></pre>

<p>It is also installed on my PATH: </p>

<pre><code>&gt;clang++
clang++.exe: error: no input files
</code></pre>

<p>I have two questions: </p>

<ol>
<li>How do I tell CMake to use <code>clang++</code> when I call <code>cmake --build</code>?</li>
<li>How can I check before building which compiler CMake is configured with?</li>
</ol>