From 11dd657333ec8e90945fe793c0ad40eadb0e0646 Mon Sep 17 00:00:00 2001 From: Julian Büning Date: Sun, 4 Aug 2019 21:17:28 +0200 Subject: test/CMakeLists.txt: use official llvm monorepo for download --- test/CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 30ccf6b2..06bf5d28 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -62,7 +62,11 @@ if (NOT EXISTS "${LLVM_TOOLS_BINARY_DIR}/not") endif() if (DOWNLOAD_FILECHECK_SOURCE) - set(FILECHECK_SRC_URL "https://raw.githubusercontent.com/llvm-mirror/llvm/release_${LLVM_VERSION_MAJOR}${LLVM_VERSION_MINOR}/utils/FileCheck/FileCheck.cpp") + if (${LLVM_VERSION_MAJOR} GREATER 3) + set(FILECHECK_SRC_URL "https://raw.githubusercontent.com/llvm/llvm-project/release/${LLVM_VERSION_MAJOR}.x/llvm/utils/FileCheck/FileCheck.cpp") + else() + set(FILECHECK_SRC_URL "https://raw.githubusercontent.com/llvm/llvm-project/release/${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.x/llvm/utils/FileCheck/FileCheck.cpp") + endif() set(FILECHECK_SRC_FILE "${CMAKE_CURRENT_BINARY_DIR}/FileCheck.cpp") if (NOT EXISTS "${FILECHECK_SRC_FILE}") message(STATUS "Downloading LLVM FileCheck source") @@ -79,7 +83,11 @@ if (DOWNLOAD_FILECHECK_SOURCE) endif() if (DOWNLOAD_NOT_SOURCE) - set(NOT_SRC_URL "https://raw.githubusercontent.com/llvm-mirror/llvm/release_${LLVM_VERSION_MAJOR}${LLVM_VERSION_MINOR}/utils/not/not.cpp") + if (${LLVM_VERSION_MAJOR} GREATER 3) + set(NOT_SRC_URL "https://raw.githubusercontent.com/llvm/llvm-project/release/${LLVM_VERSION_MAJOR}.x/llvm/utils/not/not.cpp") + else() + set(NOT_SRC_URL "https://raw.githubusercontent.com/llvm/llvm-project/release/${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.x/llvm/utils/not/not.cpp") + endif() set(NOT_SRC_FILE "${CMAKE_CURRENT_BINARY_DIR}/not.cpp") if (NOT EXISTS "${NOT_SRC_FILE}") message(STATUS "Downloading LLVM not source") -- cgit 1.4.1