Rev cmake minimum version from 3.14.2 to 3.14.5 (#34757)
authorAdeel Mujahid <adeelbm@outlook.com>
Mon, 1 Jun 2020 15:05:33 +0000 (18:05 +0300)
committerGitHub <noreply@github.com>
Mon, 1 Jun 2020 15:05:33 +0000 (17:05 +0200)
iOS requires 3.14.5 version and we have a special case for it. Since this is a minor version difference, and no distro is particularly providing cmake 3.14.2 package, it is safe to update to 3.14.5 to cover our supported platform matrix.

Discussion: https://github.com/dotnet/runtime/pull/33959#discussion_r396389297
Fixes: https://github.com/dotnet/runtime/issues/33976

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
12 files changed:
docs/workflow/requirements/linux-requirements.md
eng/native/build-commons.sh
global.json
src/coreclr/CMakeLists.txt
src/coreclr/src/pal/tests/CMakeLists.txt
src/coreclr/tests/CMakeLists.txt
src/coreclr/tests/src/profiler/native/CMakeLists.txt
src/installer/corehost/CMakeLists.txt
src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt
src/libraries/Native/Unix/CMakeLists.txt
src/libraries/Native/Windows/CMakeLists.txt
src/mono/CMakeLists.txt

index 34772c9..0cdd9cc 100644 (file)
@@ -25,7 +25,7 @@ Minimum RAM required to build is 1GB. The build is known to fail on 512 MB VMs (
 Toolchain Setup
 ---------------
 
-Building the repo requires CMake 3.14.2 or newer on Linux. Add Kitware's APT feed to your configuration for a newer version of CMake. See their instructions at <https://apt.kitware.com/>. You may need to add LLVM's APT feed to your configuration to obtain the required version of clang/LLVM. See their instructions at <https://apt.llvm.org/>.
+Building the repo requires CMake 3.14.5 or newer on Linux. Add Kitware's APT feed to your configuration for a newer version of CMake. See their instructions at <https://apt.kitware.com/>. You may need to add LLVM's APT feed to your configuration to obtain the required version of clang/LLVM. See their instructions at <https://apt.llvm.org/>.
 
 Install the following packages for the toolchain:
 
index c231a01..31d8d8b 100755 (executable)
@@ -53,10 +53,12 @@ check_prereqs()
 
     function version { echo "$@" | awk -F. '{ printf("%d%02d%02d\n", $1,$2,$3); }'; }
 
-    local cmake_version="$(cmake --version | awk '/^cmake.* version [0-9]+\.[0-9]+\.[0-9]+$/ {print $3}')"
+    local cmakeRequiredMinimumVersion="3.14.5"
+    local cmakeInstalledVersion="$(cmake --version | awk '/^cmake.* version [0-9]+\.[0-9]+\.[0-9]+$/ {print $3}')"
 
-    if [[ "$(version "$cmake_version")" -lt "$(version 3.14.2)" ]]; then
-        echo "Please install CMake 3.14.2 or newer from https://cmake.org/download/ or https://apt.kitware.com and ensure it is on your path."; exit 1;
+    if [[ "$(version "$cmakeInstalledVersion")" -lt "$(version "$cmakeRequiredMinimumVersion")" ]]; then
+        echo "Found cmake v$cmakeInstalledVersion in PATH. Please install v$cmakeRequiredMinimumVersion or newer from https://www.cmake.org/download/."
+        exit 1;
     fi
 
     if [[ "$__HostOS" == "OSX" ]]; then
index a29a4d4..ca4dc75 100644 (file)
@@ -8,7 +8,7 @@
     "dotnet": "5.0.100-preview.6.20266.3"
   },
   "native-tools": {
-    "cmake": "3.14.2",
+    "cmake": "3.14.5",
     "python3": "3.7.1"
   },
   "msbuild-sdks": {
index efad610..e684f77 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14.2)
+cmake_minimum_required(VERSION 3.14.5)
 
 cmake_policy(SET CMP0042 NEW)
 
index b6d9fe2..d6f9fa5 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14.2)
+cmake_minimum_required(VERSION 3.14.5)
 
 # Compile options
 add_definitions(-DLP64COMPATIBLE)
index 53dbb85..75beaaf 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14.2)
+cmake_minimum_required(VERSION 3.14.5)
 
 cmake_policy(SET CMP0042 NEW)
 project(Tests)
index 3de1e8b..cd51820 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.5.2)
+cmake_minimum_required(VERSION 3.14.5)
 
 project(Profiler)
 
index 4fa7f45..2343e3a 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14.2)
+cmake_minimum_required(VERSION 3.14.5)
 
 project(corehost)
 
index bcf6a05..3352dd4 100644 (file)
@@ -2,7 +2,7 @@
 # The .NET Foundation licenses this file to you under the MIT license.
 # See the LICENSE file in the project root for more information.
 
-cmake_minimum_required (VERSION 2.6)
+cmake_minimum_required (VERSION 3.14.5)
 project(mockhostfxr_2_2)
 
 set(DOTNET_PROJECT_NAME "mockhostfxr_2_2")
index aafa771..6c1c4ea 100644 (file)
@@ -1,15 +1,10 @@
-cmake_minimum_required(VERSION 3.14.2)
+cmake_minimum_required(VERSION 3.14.5)
 cmake_policy(SET CMP0042 NEW)
 
 project(CoreFX C)
 
 include(${CLR_ENG_NATIVE_DIR}/configuretools.cmake)
 
-if(CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS)
-    # CMake 3.14.5 contains bug fixes for iOS
-    cmake_minimum_required(VERSION 3.14.5)
-endif()
-
 if(NOT CLR_CMAKE_TARGET_BROWSER)
     cmake_policy(SET CMP0083 NEW)
 endif(NOT CLR_CMAKE_TARGET_BROWSER)
index 9f40534..55f310b 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14.2)
+cmake_minimum_required(VERSION 3.14.5)
 
 # C Compiler flags
 SET (CMAKE_C_FLAGS_INIT                     "/W0 /FC")
index b1f7139..574f039 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.14.5)
 
 project (mono)