[LLVMdev] CMake sample project?

sam lee skynare at gmail.com
Mon Jun 14 17:57:49 PDT 2010


Ok, I created cmake sample project that can build fibonacci.cpp (from
llvm/examples/Fibonacci/fibonacci.cpp).
I am linking to all libraries.
I'm on windows and I could not make llvm-config to work.

How does llvm-config work? I would like to port it to Python or Lua that
works on every platform. I know it's Perl, but somehow I could not get it to
build on windows. I built it on MSYS. But, invoking it (llvm-config --libs)
says: llvm-config: unknown component name: pic16codegen.
And, llvm-config --libs core  only returns -lLLVMCore (it should return
-lLLVMSystem and -lLLVMSupport).

And thank you for FindLLVM.cmake. When I have working llvm-config script,
I'll use it.

Thanks.
Sam


On Mon, Jun 14, 2010 at 5:14 AM, Cyrille Berger <cberger at cberger.net> wrote:

> On Monday 14 June 2010, Nathan Jeffords wrote:
> > I built the list by hand though trial and error. I'm not sure if and how
> > llvm-config works with cmake. Its seems now that I got the
> > right dependencies in the right order, there have been no
> > ongoing maintenance issues.
>
> I use llvm-config with cmake, for this I wrote a FindLLVM.cmake file [1],
> it
> provides a FIND_LLVM_LIBS macro that calls llvm-config, example of use in
> [2].
> Unfortunately it does not work with MSVC, so I had to hardcode the
> libraries
> when building with MSVC.
>
> The LLVM_NATIVE_OBJECTS part of FIND_LLVM_LIBS is probably not needed
> anymore,
> since everything seems to be shipped as static library nowdays.
>
> [1]
> http://bitbucket.org/opengtl/opengtl/src/tip/cmake/modules/FindLLVM.cmake
> [2]
> http://bitbucket.org/opengtl/opengtl/src/tip/OpenGTL/GTLCore/CMakeLists.txt
>
> --
> Cyrille Berger
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100614/466561e2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-sample-project.7z
Type: application/octet-stream
Size: 2595 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100614/466561e2/attachment.obj>


More information about the llvm-dev mailing list