Please look at in the Clang documentation as a reference.
- LLVM 3.9.0+ (for libClang)
- A C++11 compliant compiler
Create a build directory.
mkdir build && cd build
Export required environment variables
export LLVM_DIR=<path-to-clang-and-llvm-3.9.0>/lib/cmake/llvm
export Clang_DIR=<path-to-clang-and-llvm-3.9.0>/lib/cmake/clang
Generate a build system using any desired generator in CMake. e.g "Unix Makefiles"
cmake -G "Unix Makefiles" ../
Build - you can use any IDE if applicable to the generator, but you can also just build straight from CMake.
cmake --build .