diff --git a/interpreter/llvm/src/CMakeLists.txt b/interpreter/llvm/src/CMakeLists.txt index 7d6579f15f8d4..7769f1834b8e5 100644 --- a/interpreter/llvm/src/CMakeLists.txt +++ b/interpreter/llvm/src/CMakeLists.txt @@ -378,6 +378,7 @@ else() option(LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY "Compile with -fmodules-local-submodule-visibility." ON) endif() option(LLVM_ENABLE_CXX1Y "Compile with C++1y enabled." OFF) +option(LLVM_ENABLE_CXX1Z "Compile with C++1z enabled." OFF) option(LLVM_ENABLE_LIBCXX "Use libc++ if available." OFF) option(LLVM_ENABLE_LLD "Use lld as C and C++ linker." OFF) option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON) diff --git a/interpreter/llvm/src/cmake/modules/HandleLLVMOptions.cmake b/interpreter/llvm/src/cmake/modules/HandleLLVMOptions.cmake index 3dd16d51f0b7a..e91e951d41355 100644 --- a/interpreter/llvm/src/cmake/modules/HandleLLVMOptions.cmake +++ b/interpreter/llvm/src/cmake/modules/HandleLLVMOptions.cmake @@ -381,6 +381,9 @@ elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE ) if (LLVM_ENABLE_CXX1Y) check_cxx_compiler_flag("-std=c++1y" CXX_SUPPORTS_CXX1Y) append_if(CXX_SUPPORTS_CXX1Y "-std=c++1y" CMAKE_CXX_FLAGS) + elseif(LLVM_ENABLE_CXX1Z) + check_cxx_compiler_flag("-std=c++1z" CXX_SUPPORTS_CXX1Z) + append_if(CXX_SUPPORTS_CXX1Z "-std=c++1z" CMAKE_CXX_FLAGS) else() check_cxx_compiler_flag("-std=c++11" CXX_SUPPORTS_CXX11) if (CXX_SUPPORTS_CXX11)