[cfe-dev] Using qmake and LibTooling

Jens Weller JensWeller at gmx.de
Tue Aug 14 14:00:15 PDT 2012


Yes, but still I don't wanna use clang with qmake, or be able to build clang with qmake.
I can build clang with cmake, and thats fine in that way.
All I need is to make use of the libraries provided by clang such as LibTooling, to build Tools that use Qt as a Frontend. And this works now.

kind regards,

Jens Weller

-------- Original-Nachricht --------
> Datum: Tue, 14 Aug 2012 21:28:54 +0200
> Von: Manuel Klimek <klimek at google.com>
> An: Jens Weller <JensWeller at gmx.de>
> CC: Konstantin Tokarev <annulen at yandex.ru>, cfe-dev at cs.uiuc.edu
> Betreff: Re: [cfe-dev] Using qmake and LibTooling

> On Tue, Aug 14, 2012 at 6:09 PM, Jens Weller <JensWeller at gmx.de> wrote:
> >
> >> Datum: Tue, 14 Aug 2012 19:44:36 +0400
> >> Von: Konstantin Tokarev <annulen at yandex.ru>
> >> An: Jens Weller <jensweller at gmx.de>
> >> CC: "cfe-dev at cs.uiuc.edu" <cfe-dev at cs.uiuc.edu>
> >> Betreff: Re: [cfe-dev] Using qmake and LibTooling
> >>
> >> If all you need is to use Qt in your clang-based tools, I think you
> should
> >> stick to CMake. It both supports Qt out of the box and is supported as
> a
> >> build system for Clang tools. You can use it within Qt Creator as well.
> >>
> >> If you want to use LibTooling with qmake-based builds, you need to
> >> implement CompilationDatabase support for qmake which is not trivial.
> >
> > I usually stick to the QtSDK, and I'm right now not so familiar with
> cmake.
> > Also both uses the same compiler, shouldn't be to hard to get this setup
> running.
> > I have build the libs with the right mingw version, should be able to
> use them with qmake.
> >
> > CompilationDatabase? Isn't this a type with in the library?
> > Why should that have any influence on the make system?
> 
> CompilationDatabase is how clang tools figure out how to run clang on
> a source file.
> In general you have 2 options to get this running with a new build system:
> 1. make the build system output a compilation_database.json file as
> part of its configuration step - for meta build systems, this is the
> preferred way (that's what we did to CMake); see
> http://clang.llvm.org/docs/JSONCompilationDatabase.html
> 2. write your own CompilationDatabase implementation that can detect
> the build files for your project, parse them, and provide the compile
> command lines
> 
> Cheers,
> /Manuel
> 
> >
> > regards,
> >
> > Jens Weller
> > _______________________________________________
> > cfe-dev mailing list
> > cfe-dev at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev



More information about the cfe-dev mailing list