[LLVMdev] problem with my LLVM pass
sameer.sahasrabuddhe at amd.com
Thu Oct 18 04:22:58 PDT 2012
On Fri, 5 Oct 2012 13:04:46 +0530
Jun Koi <junkoi2004 at gmail.com> wrote:
> i am wondering if this link is still updated?
> i follow the instruction from the link, and create in my ~/test/
> directory the CMakeLists.txt with following content:
> CMake Warning at CMakeLists.txt:1 (find_package):
> Could not find module FindLLVM.cmake or a configuration file for
> package LLVM.
This error occurs when llvm-config is not in the path. I tried the same
thing by copying the CMake snippets from the above page into a new file:
$ cd test
$ cat CMakeLists.txt
# Define add_llvm_* macro's.
$ cmake .
Everything worked at this stage.
But if I removed llvm-config from my PATH, I get the following error
$ cmake .
CMake Warning at CMakeLists.txt:1 (find_package):
Could not find module FindLLVM.cmake or a configuration file for
Adjust CMAKE_MODULE_PATH to find FindLLVM.cmake or set LLVM_DIR to the
directory containing a CMake configuration file for LLVM. The file
will have one of the following names:
So I tried what cmake says:
$ cmake -DLLVM_DIR=/usr/share/llvm/cmake .
This worked with both 2.8.3 and 2.8.9
Hope that helps!
More information about the llvm-dev