Why does compile_feature cxx_std_17 adds -std=gnu++XY instead of -std=c++17 for gcc?
If one uses
target_compile_features(<target> INTERFACE cxx_std_17) with gcc, cmake adds the flag
Using the flag
-std=gnu++17 allows for GNU extensions to the c++ standard. However, this can lead to compilation errors for code that is valid in strict c++. Why does cmake choose the GNU extension flag?
It would be nice to have at least an option to change this behavior.