[CMake] GCC: -std=g++14 vs -std=c++14
Patrick Boettcher
patrick.boettcher at posteo.de
Mon Jun 13 14:05:23 EDT 2016
On Mon, 13 Jun 2016 18:40:59 +0200
Sylvain Joubert <joubert.sy at gmail.com> wrote:
> Le 13/06/2016 11:36, Patrick Boettcher a écrit :
> > Hi list,
> >
> > I'm using gcc for a c++14-based project.
> >
> > To have cmake add the corresponding -std=-flag I'm setting
> >
> > set_property(TARGET <tgt> PROPERTY CXX_STANDARD 14)
> >
> > This makes that when gcc is used cmake adds -std=gnu++14 .
> >
> > How can I make it set -std=c++14 instead?
>
> Hi,
>
> You also need to correctly set the CXX_EXTENSIONS properties to get a
> standard standard.
Yep,
set(CXX_EXTENSIONS OFF)
seems to do the trick - thanks.
regards,
--
Patrick.
More information about the CMake
mailing list