[PATCH] Set -std=c++11 flag for g++

Thiago Macieira thiago at macieira.org
Wed Jun 22 14:49:55 PDT 2016


On quarta-feira, 22 de junho de 2016 22:47:23 PDT Anton Lundin wrote:
> @@ -73,6 +73,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
>         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 ")
>  elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
>         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
> +       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
>  elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")

You want to set it for AppleClang and Intel branches too. Do we support 
building with MSVC at all?

Also note that GCC 6 defaults to C++14, so effectively this change 
"downgrades" the default support. But that might be a good idea, to make 
people using the latest GCC not add features that older compilers can't grok.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center



More information about the subsurface mailing list