title: In CMake, how can I test if the compiler is Clang?
body: <p>We have a set of <a href="https://code.asterisk.org/code/browse/astscf-cmake-release/AsteriskSCF.cmake?r=HEAD" rel="noreferrer">cross-platform CMake build scripts</a>, and we support building with <a href="http://msdn.microsoft.com/en-us/vstudio/aa718325" rel="noreferrer">Visual C++</a> and <a href="http://gcc.gnu.org/" rel="noreferrer">GCC</a>.</p>
  
  <p>We're trying out <a href="http://clang.llvm.org/" rel="noreferrer">Clang</a>, but I can't figure out how to test whether or not the compiler is Clang with our CMake script.</p>
  
  <p>What should I test to see if the compiler is Clang or not? We're currently using <a href="http://www.cmake.org/cmake/help/v2.8.8/cmake.html#variable:MSVC" rel="noreferrer"><code>MSVC</code></a> and <a href="http://www.cmake.org/cmake/help/v2.8.8/cmake.html#variable%3aCMAKE_COMPILER_IS_GNULANG" rel="noreferrer"><code>CMAKE_COMPILER_IS_GNU&lt;LANG&gt;</code></a> to test for Visual C++ and GCC, respectively.</p>