Jun Koi
2012-Aug-10 17:06 UTC
[LLVMdev] how to compile my LLVM project with CMake (on Windows)?
hi, i already successfully compiled & installled LLVM 3.1 on Windows (with CMake & Visual Studio 2008). next, i am trying to understand how to create a standalone LLVM project, and compile that on Windows (also using CMake & Visual Studio 2008). to start, i picked up the "examples\BrainF" project, renamed it to "examples\BrainF2" (and i still put BrainF2 under the same examples\ directory) next, inside BrainF2, i run on Windows console: c:\llvm-3.1\examples\BrainF2\> cmake -G "Visual Studio 9 2008" but then cmake complains error like "unknown CMake command add_llvm_example" so i guess what i did is totally wrong. but i cannot find any doc mentioning how to compile a project with CMake. any help, please?
Óscar Fuentes
2012-Aug-11 03:11 UTC
[LLVMdev] how to compile my LLVM project with CMake (on Windows)?
Jun Koi <junkoi2004 at gmail.com> writes:> i already successfully compiled & installled LLVM 3.1 on Windows (with > CMake & Visual Studio 2008). next, i am trying to understand how to > create a standalone LLVM project, and compile that on Windows (also > using CMake & Visual Studio 2008).Please read http://www.llvm.org/docs/CMake.html#embedding-llvm-in-your-project but instead of using the include_directories and link_directories as explained on that document, use: include_directories( ${LLVM_ROOT}/include ) link_directories( ${LLVM_ROOT}/lib ) [snip]