[LLVMdev] building a pass with cmake (original) (raw)

Óscar Fuentes ofv at wanadoo.es
Mon Jul 23 13:38:33 PDT 2012


erkan diken <erkandiken at gmail.com> writes:

[snip]

It seems that cmake is ok. When I run make install, it gives errors (see below) and i think the reason is that it can not find the directory to llvm header files. I could not figure it out which variable to set and how to use it in order to point the required directory ? ( as in the make pass build which requires LLVMSRCROOT LLVMOBJROOT variables to be set)

Hello2/Hello.cpp:17:23: error: llvm/Pass.h: No such file or directory Hello2/Hello.cpp🔞27: error: llvm/Function.h: No such file or directory Hello2/Hello.cpp:19:38: error: llvm/Support/rawostream.h: No such file or directory Hello2/Hello.cpp:20:32: error: llvm/ADT/Statistic.h: No such file or directory Hello2/Hello.cpp:21: error: ‘llvm’ is not a namespace-name ... Your feedback is very welcome.

I think this is the same problem that was reported here a few weeks ago. IIRC LLVM_INCLUDE_DIRS and LLVM_LIBRARY_DIRS are wrong after install. Try with

include_directories( ${LLVM_ROOT}/include ) link_directories( ${LLVM_ROOT}/lib )



More information about the llvm-dev mailing list