For Ubuntu 14.04, I had to change
CMAKE_C_COMPILER=/usr/local/bin/clang
in addition to the CMAKE_CXX_COMPILER option to get it to compile.
Setup
Linux x 3.13.0-46-generic #79-Ubuntu SMP Tue Mar 10 20:06:50 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
git trunk as of 2015.03.19
For OSX 10.10 and Homebrew
I was unable to compile clang with clang as suggested. Tried the CMAKE_CXX_COMPILER and LLVM_ENABLE_LIBCXX options, but the build was unable to find the C++ head files (utility, specifically).
Sorry for the lack of details. But, following the instructions on OS X + homebrew should fail to build. If not please message me and I'll add more info.
Extended Description
Following http://clang.llvm.org/docs/LibASTMatchersTutorial.html
For Ubuntu 14.04, I had to change CMAKE_C_COMPILER=/usr/local/bin/clang
in addition to the CMAKE_CXX_COMPILER option to get it to compile.
Setup
Linux x 3.13.0-46-generic #79-Ubuntu SMP Tue Mar 10 20:06:50 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
git trunk as of 2015.03.19
For OSX 10.10 and Homebrew
I was unable to compile clang with clang as suggested. Tried the CMAKE_CXX_COMPILER and LLVM_ENABLE_LIBCXX options, but the build was unable to find the C++ head files (utility, specifically).