[cfe-dev] Using qmake and LibTooling

Manuel Klimek klimek at google.com
Tue Aug 14 12:28:54 PDT 2012


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