CMake does not set the compiler option -std to gnu17 or c++17 although I set the target_compile_features to cxx_std_17

Please post an example CMakeLists.txt file demonstrating how a -std=c++11 flag is showing up.