c++ - version check In cmake, how can I test if the compiler is Clang?

1 Answers

The OGRE 3D engine source code uses the following check:

endif ()
cmake set compiler

We have a set of cross platform CMake build scripts, and we support building with MSVC and GCC.

We're trying out Clang, but I can't figure out how to test whether or not the compiler is Clang with our CMake script.

What should I test to see if the compiler is Clang or not? We're currently using MSVC and CMAKE_COMPILER_IS_GNU<LANG> to test for MSVC and GCC, respectively.