[Qt-creator] Clang Model plugin interface
Antonio Di Monaco
tony at becrux.com
Fri Dec 15 19:19:10 CET 2017
Hi Bryan,
yes, that could be a start, even if I cannot use the JSON compile database.
What I'd like to have is just an interface class for clang parameters, that I can subclass and register in the Clang Model, in order to pass such options dynamically.
Maybe the bug proves that I did not miss anything, and indeed there's no support for that yet. As I have to work on it in any case, cause it's a showstopper for me, I'll do my change proposal, when it's completed.
Thanks,
BR,
A.
Sent from BlueMail
-------- Original Message --------
From: Bryan Bennetts <bryan.bennetts at gmail.com>
Sent: Fri Dec 15 17:26:16 GMT+01:00 2017
To: Antonio Di Monaco <tony at becrux.com>
Cc: qt-creator at qt-project.org
Subject: Re: [Qt-creator] Clang Model plugin interface
Hi Antonio,
FWIW I raised QTCREATORBUG-18402
<https://bugreports.qt.io/browse/QTCREATORBUG-18402> which *might* address
your needs, if implemented - I have yet to even think about how it'd be
done though.
Cheers, Bryan.
On Fri, 15 Dec 2017 at 16:11 Antonio Di Monaco <tony at becrux.com> wrote:
> Hi,
>
> I'm writing a Qt Creator plugin to support our own custom build process.
>
> My issue is that I cannot find a way to interact with the Clang Code Model
> plugin, in order to pass to it specific compile options (in my case, it's
> --gcc-toolchain).
>
> In detail, my plugin automates the kit creation, in order to find out the
> custom compiler, debugger, and all other stuff we need to build, including
> our build tool. I'm populating the CppTools::RawProjectsParts data
> structure according
> to the specific toolchain that has been selected by the user (that could
> be a Clang, GCC or MSVC compiler), and everything works fine, as long as I
> work with the built-in C++ Code Model.
>
> When I activate the Clang Code Model and GCC profile is activated, as the
> same CppTools::RawProjectsParts data is accessed (is it true or did I miss
> something?), I encounter a failure, cause if I add the "--gcc-toolchain"
> parameter, Clang model works, but the built-in fails. And if not, of course
> the opposite happens, and I'd like to have both running.
>
> I'd like just to interact with the Clang Code Model at "run-time" and,
> behind the scene, add my mandatory options to it, without asking the user
> for a UI settings change (also cause the path passed to the "gcc-toolchain"
> parameter changes according to the profile selected by the user).
>
> My question is: is there an interface, or anything similar, that I can use
> in order to add such parameters to clang model only? I could also change
> the Qt Creator code, but I'd like to go for the clean way, if there's any.
>
> Thanks for your help!
> A.
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20171215/77ef2011/attachment.html>
More information about the Qt-creator
mailing list