[LLVMdev] CMake build using LLVM install dir

Greg Fitzgerald garious at gmail.com
Wed Feb 26 17:05:08 PST 2014


Looking at lld's top-level CMakeLists.txt, it looks like its giving
users the option to build the project either from within the LLVM
source tree or against the LLVM install directory via the
LLD_PATH_TO_LLVM_BUILD variable.  However, I can't seem to get the
latter approach to work.  A couple problems I ran into:

1) The AddLLVM.cmake in the LLVM install directory references
variables that are set in LLVM's top-level CMakeLists.txt.
2) TableGen.cmake expects LLVM_MAIN_SRC_DIR to be set.

Should this work?  Is there a doc for how to create new a CMake
project that uses LLVM?

Thanks,
Greg



More information about the llvm-dev mailing list