On Tue, 7 May 2019 at 01:15, Angel Campoverde <campoverdeang...@gmail.com> wrote: > > I am looking at: > > https://cmake.org/cmake/help/v3.14/prop_tgt/CXX_STANDARD.html > > and I see that I can pass 20, for c++20. However I do not have that in my > compiler, > I only have c++2a and gnu++2a, this means that CMake goes back to c++17
No, it doesn't mean that. The valid values documented for CXX_STANDARD are CMake generalisation and not what is directly passed via -std= or /std: or whatever option your compiler uses. If you run this cmake command cmake -DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_EXTENSIONS=OFF .. and then VERBOSE=1 make you will clearly see that CMake generated the compiler command lines with -std=c++2a IFF, you are using version of GCC or clang that supports c++2a, obviously (i.e. GCC 8/clang 6 or later. I'm not entirely confident about clang) Best regards, -- Mateusz Loskot, http://mateusz.loskot.net -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake