[Qt-creator] Generic Project Manager, code model and C++11

Alexander Drozdov adrozdoff at gmail.com
Sat Jun 7 01:42:28 CEST 2014


I disagree with this code:

1. it is hack
2. it affect only project manager
3. it is no configurable

Most clean  solution for me - set up valid Toolchain. But it will more cool
to customize some toolchain settings per-project (like platform link and
compilation flags)



2014-05-28 9:18 GMT+11:00 Thorbjørn Lindeijer <bjorn at lindeijer.nl>:

> Hey Fawzi and Alexander,
>
> I've personally been bothered by this in some of my hobby projects and I
> never realized the workaround mentioned here. Hence, I'm proposing the
> following change which would make things just work for most people:
>
> https://codereview.qt-project.org/#change,86337
>
> Of course, this probably has the downside that it is not possible to
> force a non-C++11 mode. At least, not until the GenericProject gains a
> configuration page where you could configure the compiler flags.
>
> Regards,
> Bjørn
>
> On 22.05.2014 23:24, Alexander Drozdov wrote:
> > Thanks, Mohamed!
> >
> > I found report with this issue:
> > https://bugreports.qt-project.org/browse/QTCREATORBUG-10404
> >
> > But, process to turn on C++11 support on different project managers
> > looks different and non-intuitive.
> >
> >
> > 2014-05-22 23:00 GMT+11:00 Mohamed Fawzi <Fawzi.Mohamed at digia.com
> > <mailto:Fawzi.Mohamed at digia.com>>:
> >
> >     you can create a toolchain that add the flags to to the platform
> >     codegen and platform link flags fields of the toolchain
> >     (options>Build & Run>Compilers). And use that in your kit.
> >     But if you are using qmake (with CONFIG+=c++11 )the flags should be
> >     added automatically.
> >
> >     Fawzi
> >     On 22-mag-2014, at 00:10, Alexander Drozdov <adrozdoff at gmail.com
> >     <mailto:adrozdoff at gmail.com>> wrote:
> >
> >>     Hi list!
> >>
> >>     Master napshots uses CXX11 by default for parser (Code Model Check
> >>     confirm it).
> >>
> >>     But, I found that directive __cplusplus defined as 199711L, it
> >>     looks like toolchain asked for predefined constants without
> >>     -std=c++11 pass as argument.
> >>
> >>     I found work-around: add next declaration to .config file:
> >>     #define __cplusplus 201103L
> >>
> >>     Now I can use std::chrono, std::thread, std::mutex without
> >>     limitations.
> >>
> >>     --
> >>     WBR, Alexander Drozdov
> >>     http://htrd.su <http://htrd.su/>
> >>     _______________________________________________
> >>     Qt-creator mailing list
> >>     Qt-creator at qt-project.org <mailto:Qt-creator at qt-project.org>
> >>     http://lists.qt-project.org/mailman/listinfo/qt-creator
> >
> >
> >
> >
> > --
> > WBR, Alexander Drozdov
> > http://htrd.su
> >
> >
> > _______________________________________________
> > Qt-creator mailing list
> > Qt-creator at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/qt-creator
> >
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
>



-- 
WBR, Alexander Drozdov
http://htrd.su
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20140607/b30c06ab/attachment.html>


More information about the Qt-creator mailing list