[cmake-developers] Why does CMAKE_CXX_STANDARD set 'gnu' flags?
Brad King
brad.king at kitware.com
Mon Oct 2 07:01:15 EDT 2017
On 10/01/2017 08:29 PM, Nikola Smiljanic wrote:
> I'd like to know why CMake uses 'gnu' flags when setting C++ standard.
> I find this very surprising as 'gnu' mode enables non standard extensions?
Setting the standard level should not affect the extensions, and the compiler's
default mode includes extensions. There is a separate property for extensions:
https://cmake.org/cmake/help/v3.9/prop_tgt/CXX_EXTENSIONS.html
It is ON by default since most compilers have extensions on by default.
-Brad
More information about the cmake-developers
mailing list