From c2fe94b59e4686430b1ee1ebbf64ef219239b07b Mon Sep 17 00:00:00 2001 From: Robert Blake Date: Wed, 17 Jun 2020 17:14:54 -0700 Subject: [PATCH 1/2] Allowing clang to be built from an external repo Useful for packaging Cling with spack, intended to be used with this integration of the ROOT cling-patches onto llvm-project's repository. New location of the cling-patches, integrated with llvm-project and based off of llvm@5.0.2: https://github.com/rblake-llnl/llvm-project/tree/cling-patches/clang Old location of the clang cling-patches, standalone http://root.cern.ch/git/clang.git , branch cling-patches. I also have a version of llvm-project that can be used to build cling with spack, standalone. --- CMakeLists.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8471a490e3..d673a1c700 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -463,10 +463,17 @@ elseif(ROOT_CLASSIC) ) else() # and this when building Cling standalone: - include_directories(BEFORE - ${CMAKE_CURRENT_BINARY_DIR}/../clang/include - ${CMAKE_CURRENT_SOURCE_DIR}/../clang/include - ) + if (DEFINED LLVM_EXTERNAL_CLANG_SOURCE_DIR) + include_directories(BEFORE + ${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/include + ${CMAKE_CURRENT_BINARY_DIR}/../clang/include + ) + else() + include_directories(BEFORE + ${CMAKE_CURRENT_BINARY_DIR}/../clang/include + ${CMAKE_CURRENT_SOURCE_DIR}/../clang/include + ) + endif() endif() include_directories(BEFORE From 5305d63deb8d181aea83843c06fcb463d30ce674 Mon Sep 17 00:00:00 2001 From: Robert Blake Date: Thu, 27 Aug 2020 09:56:01 -0700 Subject: [PATCH 2/2] Update CMakeLists.txt Co-authored-by: Vassil Vassilev --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d673a1c700..e8a374bc9d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -463,7 +463,7 @@ elseif(ROOT_CLASSIC) ) else() # and this when building Cling standalone: - if (DEFINED LLVM_EXTERNAL_CLANG_SOURCE_DIR) + if (LLVM_EXTERNAL_CLANG_SOURCE_DIR) include_directories(BEFORE ${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/include ${CMAKE_CURRENT_BINARY_DIR}/../clang/include