[Qt-creator] Generic Project Manager, code model and C++11
Thorbjørn Lindeijer
bjorn at lindeijer.nl
Wed May 28 00:18:18 CEST 2014
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
>
More information about the Qt-creator
mailing list