[Qt-creator] Creator ignores condition blocks?

Jonathan S. Shapiro shap at eros-os.org
Tue Mar 13 00:06:34 CET 2012


The "workaround" is to use subdirectories for the target-specific source
files.

On Mon, Mar 12, 2012 at 1:59 PM, Danny Price <deepblue842 at googlemail.com>wrote:

> Is there a workaround? It's annoying to have the tree cluttered up with
> files irrelevant to the hist platform and it gets worse when you have unix
> files in there too!
>
> I've resorted to commenting out the include() but that's not ideal.
>
> On 12 Mar 2012, at 20:34, Coda Highland wrote:
>
> > On Mon, Mar 12, 2012 at 3:25 PM, Danny Price <deepblue842 at googlemail.com>
> wrote:
> >> I have the following in my .pro file:
> >>
> >> macx {
> >>    include(mac.pri)
> >> }
> >>
> >> win32 {
> >>    include(win.pri)
> >> }
> >>
> >> These pri files include different code for the relevant platform and
> only the correct files are compiled. However, rather than display only the
> relevant files in the project tree as I would expect, Creator includes ALL
> of them as though the conditions were not there.
> >>
> >> I tried putting message() calls in the blocks above and only one or the
> other is parsed when I run QMake so why is Creator displaying the wrong
> files?
> >>
> >> I've noticed similar problems with configuration blocks - Creator
> includes the files fall all configurations, even those are not active.
> >>
> >> Is this a bug?
> >
> > My understanding from earlier discussions is that this is intentional.
> > The theory is that you're interested in modifying the source files in
> > your project regardless of the build configuration you have chosen at
> > the moment.
> >
> > /s/ Adam
>
> _______________________________________________
> 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/20120312/19e8a184/attachment.html>


More information about the Qt-creator mailing list