[PATCH] D60399: [CMake] Replace LLVM_ENABLE_CXX1Y and friends with LLVM_CXX_STD
Justin Bogner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 8 06:27:55 PDT 2019
bogner added a comment.
In D60399#1458258 <https://reviews.llvm.org/D60399#1458258>, @MaskRay wrote:
> Can we use `CMAKE_CXX_STANDARD` instead? https://cmake.org/cmake/help/latest/variable/CMAKE_CXX_STANDARD.html
Maybe, but that flag's behaviour is a bit complicated/surprising.
- It uses gnu++ by default instead of c++, but it looks like we could set CXX_EXTENSIONS to no to disable that. This would mean that if someone wants to use gnu++ they'll need to know about the CXX_EXTENSIONS flag, of course.
- Based on some testing, cmake doesn't really do the right thing with CMAKE_CXX_STANDARD very reliably. On cmake 3.12, at least, specifying 20 uses gnu++1z rather than gnu++2a like it should. It also seems to use gnu++1z rather than gnu++17 for 17 still, which is a bit odd but not the end of the world.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60399/new/
https://reviews.llvm.org/D60399
More information about the llvm-commits
mailing list