I am trying to compile the Oclgrind project in github but when I run the cmake command I get the next error:
-- Found LLVM 9.0.0
-- Using LLVMConfig.cmake in: /usr/lib/llvm-9/cmake
CMake Error at CMakeLists.txt:112 (message):
Clang headers not found (set CLANG_ROOT)
when I open the cmakelist.txt file I found out that it is looking for CodeGenAction.h
find_path(CLANG_HEADER "clang/CodeGen/CodeGenAction.h")
if ("${CLANG_HEADER}" STREQUAL "CLANG_HEADER-NOTFOUND")
message(FATAL_ERROR "Clang headers not found (set CLANG_ROOT)")
endif()
I have several version of llvm and clang installed but I haven't managed to find this file. Also I downloaded the pre-compiled binaries of clang+llvm and I do see this header there. the OclProject has a flag LLVM_DIR which configs in installation dir, but it is not working (I guess that cmake recognize that I have llvm in the system and trying to use it and not the LLVM_DIR flag that I gave)...
- Why the installation of clang/llvm on ubuntu doesn't installing the clang headers as well (as I see in the downloaded pre-compiled files)?
- How can I install those headers in my ubutnu (I have several version of clang and llvm)