CMake Error: install() includes a target which requires

I’m trying to configure root-6.06.08 using cmake with the following command:

cmake ../root-6.06.08 -DCMAKE_INSTALL_PREFIX=/localhome/ivanp/gcc-6.2.0/root-6.06.08 -DCMAKE_Fortran_COMPILER=/localhome/ivanp/gcc-6.2.0/gcc/bin/gfortran -DCMAKE_C_COMPILER=/localhome/ivanp/gcc-6.2.0/gcc/bin/gcc -DCMAKE_CXX_COMPILER=/localhome/ivanp/gcc-6.2.0/gcc/bin/g++ -DPYTHON_EXECUTABLE=/localhome/ivanp/gcc-6.2.0/python-2.7.12/bin/python -DPYTHON_INCLUDE_DIR=/localhome/ivanp/gcc-6.2.0/python-2.7.12/include -DPYTHON_LIBRARY=/localhome/ivanp/gcc-6.2.0/python-2.7.12/lib/libpython2.7.so.1.0 -DBUILD_SHARED_LIBS=ON -Dall=ON -Dcxx11=OFF -Dcxx14=ON -Dpythia6=OFF -Dpythia8=OFF -DXROOTD_ROOT_DIR=/localhome/ivanp/gcc-6.2.0/xrootd-4.4.1

But I get these errors at the end.

-- Configuring done
CMake Error: install(EXPORT "ROOTExports" ...) includes target "Cling" which requires target "clingInterpreter" that is not in the export set.
CMake Error: install(EXPORT "ROOTExports" ...) includes target "Cling" which requires target "clingMetaProcessor" that is not in the export set.
CMake Error: install(EXPORT "ROOTExports" ...) includes target "Cling" which requires target "clingUtils" that is not in the export set.
-- Generating done

And when I run make, the compilation fails at

[  2%] Linking CXX shared library ../libLLVMTableGen.so

with errors complaining about undefined references to a lot of things in the llvm:: namespace.

I’ve tried the system cmake version 2.8.12.2 and 3.7.0-rc2 I installed today.
The same happens with root-6.06.06.