diff --git a/interpreter/CMakeLists.txt b/interpreter/CMakeLists.txt index ac78add94db9f..f705cc23139da 100644 --- a/interpreter/CMakeLists.txt +++ b/interpreter/CMakeLists.txt @@ -95,6 +95,9 @@ set(CLANG_ENABLE_FORMAT OFF CACHE BOOL "") #---Remove the inherited include_directories() set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "") +#---Disable VCS writing to prevent that we always have to rebuild when someone touched the git HEAD +set(LLVM_APPEND_VC_REV OFF CACHE BOOL "Disabled LLVM revision dependency" FORCE) + #---Add the sub-directory excluding all the targets from all----------------------------------------- if(CMAKE_GENERATOR MATCHES "Xcode") add_subdirectory(llvm/src) diff --git a/interpreter/llvm/src/include/llvm/Support/CMakeLists.txt b/interpreter/llvm/src/include/llvm/Support/CMakeLists.txt index c58ccf216303c..65f5347fe5024 100644 --- a/interpreter/llvm/src/include/llvm/Support/CMakeLists.txt +++ b/interpreter/llvm/src/include/llvm/Support/CMakeLists.txt @@ -38,6 +38,13 @@ set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSRevision.h") set(get_svn_script "${LLVM_CMAKE_PATH}/GenerateVersionFromCVS.cmake") +# Ugly hack to prevent rebuilding LLVM whenever the git HEAD timestamp +# changes. This is properly solved by setting LLVM_APPEND_VC_REV to OFF +# but this only really works once this review is included in our LLVM +# version: https://reviews.llvm.org/D35377 +# Once our LLVM version includes this review, this code can be removed +# as we properly set LLVM_APPEND_VC_REV in interpreter/CMakeLists.txt. +set(llvm_vc) if(DEFINED llvm_vc) # Create custom target to generate the VC revision include. add_custom_command(OUTPUT "${version_inc}"