|
| 1 | +diff --git a/interpreter/CMakeLists.txt b/interpreter/CMakeLists.txt |
| 2 | +index de5056d..8f993f7 100644 |
| 3 | +--- a/interpreter/CMakeLists.txt |
| 4 | ++++ b/interpreter/CMakeLists.txt |
| 5 | +@@ -229,6 +229,11 @@ if(builtin_llvm) |
| 6 | + |
| 7 | + set(LLVM_ENABLE_PROJECTS "clang" CACHE STRING "") |
| 8 | + |
| 9 | ++ # Always build LLVM with C++17. It is not necessary to compile with the same |
| 10 | ++ # C++ standard as the rest of ROOT and sometimes it doesn't even work. |
| 11 | ++ set(_cxx_standard ${CMAKE_CXX_STANDARD}) |
| 12 | ++ set(CMAKE_CXX_STANDARD 17) |
| 13 | ++ |
| 14 | + #---Add the sub-directory excluding all the targets from all----------------------------------------- |
| 15 | + if(CMAKE_GENERATOR MATCHES "Xcode") |
| 16 | + add_subdirectory(llvm-project/llvm) |
| 17 | +@@ -236,6 +241,8 @@ if(builtin_llvm) |
| 18 | + add_subdirectory(llvm-project/llvm EXCLUDE_FROM_ALL) |
| 19 | + endif() |
| 20 | + |
| 21 | ++ set(CMAKE_CXX_STANDARD ${_cxx_standard}) |
| 22 | ++ |
| 23 | + set(LLVM_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/interpreter/llvm-project/llvm/include |
| 24 | + ${CMAKE_BINARY_DIR}/interpreter/llvm-project/llvm/include |
| 25 | + CACHE STRING "LLVM include directories." |
| 26 | +@@ -446,7 +453,14 @@ else() |
| 27 | + # Disable linking against shared LLVM |
| 28 | + set(LLVM_LINK_LLVM_DYLIB OFF) |
| 29 | + |
| 30 | ++ # Always build LLVM with C++17. It is not necessary to compile with the same |
| 31 | ++ # C++ standard as the rest of ROOT and sometimes it doesn't even work. |
| 32 | ++ set(_cxx_standard ${CMAKE_CXX_STANDARD}) |
| 33 | ++ set(CMAKE_CXX_STANDARD 17) |
| 34 | ++ |
| 35 | + add_subdirectory(llvm-project/clang EXCLUDE_FROM_ALL) |
| 36 | ++ |
| 37 | ++ set(CMAKE_CXX_STANDARD ${_cxx_standard}) |
| 38 | + endif(builtin_clang) |
| 39 | + |
| 40 | + set( CLANG_BUILT_STANDALONE 1 ) |
0 commit comments