[LLVMdev] CMake sample project?

Nathan Jeffords blunted2night at gmail.com
Sun Jun 13 11:44:36 PDT 2010


This isn't meant to be a sample, but I can share with you the cmake files I
use for my compiler. It builds in both windows user MSVC, and linux using
G++, but should work with MinGW.

the structure is

src/
  CMakeLists.txt  # root make file
  front/
    CMakeLists.txt  # library
  middle/
    CMakeLists.txt # library
  back/
    CMakeLists.txt # library
  npp/
    CMakeLists.txt # executable



On Sun, Jun 13, 2010 at 8:00 AM, Óscar Fuentes <ofv at wanadoo.es> wrote:

> sam lee <skynare at gmail.com> writes:
>
> > Hi,
> >
> > I built LLVM on Windows XP through cmake and MinGW make. That was a
> breeze!
> > Now, I wanted to start a project.
> > It seems like I need Makefile.rules and Makefile.config to start a new
> > project (from http://llvm.org/docs/Projects.html).
>
> Those files are unrelated to cmake.
>
> > And llvm/projects/sample uses autoconf (or ./configure). Is there cmake
> > based sample project available?
> > I could not find any from official release. Has any of you written sample
> > project template that uses cmake?
>
> Just make a directory under LLVM_ROOT/projects and put your source
> there, with a CMakeLists.txt file that contains the right directives
> (you can use any of the llvm tools or libraries under LLVM_ROOT/tools or
> LLVM_ROOT/lib as an example.) After creating those files, you must
> re-invoke cmake for it taking notice of your new project.
>
> Another approach is to build and install LLVM and write your project as
> an standalone source tree outside LLVM's. Then link the LLVM libraries
> into your executable.
>
> [snip]
>
> _______________________________________________
> 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/20100613/8dc43dd1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: src.zip
Type: application/zip
Size: 2486 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100613/8dc43dd1/attachment.zip>


More information about the llvm-dev mailing list