[CMake] CMAKE_CXX_STANDARD_REQUIRED not working in helloworld

Winfried winfried_mb2 at xmsnet.nl
Tue Mar 7 11:57:09 EST 2017


Robert Maynard schreef op 07.03.2017 16:34:
> The issue is that GCC 4.8 c++1y does offer support for some c++14
> features ( https://gcc.gnu.org/projects/cxx-status.html#cxx14 ) and
> therefore that is why you getting a compile time failure. You could
> try using target_compile_features instead but it only verifies
> language level features and is not aware of standard library features
> such as std::string_literals.
> 

Thanks for the clarification. I already tried setting the CXX_STANDARD 
and CXX_STANDARD_REQUIRED target compile features directly, but that 
gives the same result.
I will add an extra check for gcc >= 4.9.




More information about the CMake mailing list