As of version 3.3.1, CMake sets CMAKE_C11_STANDARD_COMPILE_OPTION and
CMAKE_C11_EXTENSION_COMPILE_OPTION for GCC >= 4.7, and checks for C11
features for GCC >= 4.6. It also means CMake itself will be built with
-std=gnu11 if GCC >= 4.7 is used.
However, GCC only has full C11 support with the 4.9
Raphael Kubo da Costa wrote:
> Adjust the GCC feature detection code to only consider C11 support to
> exist on GCC >= 4.9.
If you do that you must remove the definition of
CMAKE_CXX11_STANDARD_COMPILE_OPTION for GNU < 4.8.1 too.
IOW, this patch is not correct, and should not be merged.
On 09/14/2015 01:53 PM, Raphael Kubo da Costa wrote:
> Especially if you take into account the
> CMAKE_CXX11_STANDARD_COMPILE_OPTION argument, one could argue that this
> is about choosing how strict CMake should be when determining whether a
> compiler implements a standard: enabling C++11
Stephen Kelly writes:
> Raphael Kubo da Costa wrote:
>
>> Adjust the GCC feature detection code to only consider C11 support to
>> exist on GCC >= 4.9.
>
> If you do that you must remove the definition of
> CMAKE_CXX11_STANDARD_COMPILE_OPTION for GNU < 4.8.1 too.
[...]
>
Brad King writes:
> In this case CMake itself cannot build with C11 on this compiler/platform
> combination so we should not try to do so. We already have some checks
> here:
>
> http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=CMakeLists.txt;hb=v3.3.1#l39
>
> to decide
On 09/14/2015 02:29 PM, Raphael Kubo da Costa wrote:
> Do you mean checking for FreeBSD and compiler version? I thought it'd be
> too specific for upstream and was just going to make it be built with a
> different standard (or no standard) on FreeBSD itself.
I meant to add a try_compile check
Raphael Kubo da Costa wrote:
> Stephen Kelly writes:
>
>> Raphael Kubo da Costa wrote:
>>
>>> Adjust the GCC feature detection code to only consider C11 support to
>>> exist on GCC >= 4.9.
>>
>> If you do that you must remove the definition of
>>