CMake hasn't been updated to be aware that XCode 10 added support for C++20 (via -std=c++2a). I have opened a MR to correct this which you can track at: https://gitlab.kitware.com/cmake/cmake/merge_requests/3294
On Tue, May 7, 2019 at 12:24 PM Angel Campoverde <campoverdeang...@gmail.com> wrote: > > Hi, > > No, It does not work, I told Cmake to use c++ 20, but it still goes back to > c++17. You can see what I get here: > > https://pastebin.com/5ub18cMU > > my CMakeLists.txt is here: > > https://pastebin.com/3bwMKrWB > > do you know what could be the problem? > > Cheers. > > On Tue, May 7, 2019 at 2:33 AM Mateusz Loskot <mate...@loskot.net> wrote: >> >> 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 > > -- > > 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 -- 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