diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -3,9 +3,19 @@ cmake_minimum_required(VERSION 3.4.3) if ("${CMAKE_VERSION}" VERSION_LESS "3.13.4") - message(FATAL_ERROR - "Your CMake version is ${CMAKE_VERSION}. The minimum version of CMake " - "required to build LLVM is now 3.13.4.") + set(ERROR_MSG " Your CMake version is ${CMAKE_VERSION}. The minimum version of CMake " + " required to build LLVM is now 3.13.4.\n \n" + " You can download CMake from: https://github.com/Kitware/CMake/releases") + if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux") + string(APPEND ERROR_MSG "\n" + " or can locally get cmake in the current build directory:\n" + " $ wget https://github.com/Kitware/CMake/releases/download/v3.18.0/cmake-3.18.0-Linux-x86_64.tar.gz\n" + " $ echo \"4d9a9d3351161073a67e49366d701b6fa4b0343781982dc5eef08a02a750d403 cmake-3.18.0-Linux-x86_64.tar.gz\" | sha256sum -c\n" + " $ tar -xf cmake-3.18.0-Linux-x86_64.tar.gz && (cd cmake-3.18.0-Linux-x86_64 && ./bootstrap && make)\n" + " # Done, cmake is usable, nothing is installed on the system, everything is self-contained *inside* the build directory itself.\n" + " $ ./cmake-3.18.0-Linux-x86_64/bin/cmake ../llvm/ -D.... # build LLVM as usual.") + endif() + message(FATAL_ERROR ${ERROR_MSG}) endif() if(POLICY CMP0068)