From d178ce5c6edb466d1a074a3eed313af522dcc365 Mon Sep 17 00:00:00 2001 From: Adeel Date: Fri, 10 Apr 2020 16:54:59 +0000 Subject: [PATCH 1/2] Rev cmake minimum version from 3.14.2 to 3.14.5 --- docs/workflow/requirements/linux-requirements.md | 2 +- eng/native/build-commons.sh | 8 +++++--- global.json | 2 +- src/coreclr/CMakeLists.txt | 2 +- src/coreclr/src/pal/tests/CMakeLists.txt | 2 +- src/coreclr/tests/CMakeLists.txt | 2 +- src/coreclr/tests/src/profiler/native/CMakeLists.txt | 2 +- src/installer/corehost/CMakeLists.txt | 2 +- .../corehost/cli/test/mockhostfxr/CMakeLists.txt | 2 +- src/libraries/Native/Unix/CMakeLists.txt | 7 +------ src/libraries/Native/Windows/CMakeLists.txt | 2 +- src/mono/CMakeLists.txt | 2 +- 12 files changed, 16 insertions(+), 19 deletions(-) diff --git a/docs/workflow/requirements/linux-requirements.md b/docs/workflow/requirements/linux-requirements.md index 5cb61d12c20ed..0c2b116f71acc 100644 --- a/docs/workflow/requirements/linux-requirements.md +++ b/docs/workflow/requirements/linux-requirements.md @@ -62,7 +62,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 . Also, add LLVM/s APT feed to your configuration for a newer version of CMake. See their instructions as . +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 . Also, add LLVM/s APT feed to your configuration for a newer version of CMake. See their instructions as . Install the following packages for the toolchain: diff --git a/eng/native/build-commons.sh b/eng/native/build-commons.sh index ad9ed3c523047..106bdcc19c777 100755 --- a/eng/native/build-commons.sh +++ b/eng/native/build-commons.sh @@ -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 http://www.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 [[ "$__UseNinja" == 1 ]]; then diff --git a/global.json b/global.json index 350fdf44892dd..748fc63eaf95f 100644 --- a/global.json +++ b/global.json @@ -8,7 +8,7 @@ "dotnet": "5.0.100-preview.4.20202.8" }, "native-tools": { - "cmake": "3.14.2", + "cmake": "3.14.5", "python3": "3.7.1" }, "msbuild-sdks": { diff --git a/src/coreclr/CMakeLists.txt b/src/coreclr/CMakeLists.txt index efad61086e853..e684f778d85f5 100644 --- a/src/coreclr/CMakeLists.txt +++ b/src/coreclr/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.14.2) +cmake_minimum_required(VERSION 3.14.5) cmake_policy(SET CMP0042 NEW) diff --git a/src/coreclr/src/pal/tests/CMakeLists.txt b/src/coreclr/src/pal/tests/CMakeLists.txt index b6d9fe2d44eb8..d6f9fa55543a8 100644 --- a/src/coreclr/src/pal/tests/CMakeLists.txt +++ b/src/coreclr/src/pal/tests/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.14.2) +cmake_minimum_required(VERSION 3.14.5) # Compile options add_definitions(-DLP64COMPATIBLE) diff --git a/src/coreclr/tests/CMakeLists.txt b/src/coreclr/tests/CMakeLists.txt index 53dbb85a58b76..75beaaf36ae5e 100644 --- a/src/coreclr/tests/CMakeLists.txt +++ b/src/coreclr/tests/CMakeLists.txt @@ -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) diff --git a/src/coreclr/tests/src/profiler/native/CMakeLists.txt b/src/coreclr/tests/src/profiler/native/CMakeLists.txt index 3de1e8b7c1c0a..cd5182062c18a 100644 --- a/src/coreclr/tests/src/profiler/native/CMakeLists.txt +++ b/src/coreclr/tests/src/profiler/native/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.2) +cmake_minimum_required(VERSION 3.14.5) project(Profiler) diff --git a/src/installer/corehost/CMakeLists.txt b/src/installer/corehost/CMakeLists.txt index 43a59a1a6955d..8f1ef79f17daa 100644 --- a/src/installer/corehost/CMakeLists.txt +++ b/src/installer/corehost/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.14.2) +cmake_minimum_required(VERSION 3.14.5) project(corehost) diff --git a/src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt b/src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt index bcf6a05122955..3352dd48d5149 100644 --- a/src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt +++ b/src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt @@ -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") diff --git a/src/libraries/Native/Unix/CMakeLists.txt b/src/libraries/Native/Unix/CMakeLists.txt index f14ada69feed9..e3d5c1a436b34 100644 --- a/src/libraries/Native/Unix/CMakeLists.txt +++ b/src/libraries/Native/Unix/CMakeLists.txt @@ -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_ARCH_WASM) cmake_policy(SET CMP0083 NEW) endif(NOT CLR_CMAKE_TARGET_ARCH_WASM) diff --git a/src/libraries/Native/Windows/CMakeLists.txt b/src/libraries/Native/Windows/CMakeLists.txt index 9f4053485e498..55f310b82742f 100644 --- a/src/libraries/Native/Windows/CMakeLists.txt +++ b/src/libraries/Native/Windows/CMakeLists.txt @@ -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") diff --git a/src/mono/CMakeLists.txt b/src/mono/CMakeLists.txt index b1f71398f834a..574f039b16623 100644 --- a/src/mono/CMakeLists.txt +++ b/src/mono/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.10) +cmake_minimum_required (VERSION 3.14.5) project (mono) From 88ec89668113a8f3547741579c69daa231d52d04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Mon, 1 Jun 2020 11:51:07 +0200 Subject: [PATCH 2/2] Fix merge --- eng/native/build-commons.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/native/build-commons.sh b/eng/native/build-commons.sh index 8bf9f3103a82a..31d8d8b663f5f 100755 --- a/eng/native/build-commons.sh +++ b/eng/native/build-commons.sh @@ -59,6 +59,7 @@ check_prereqs() 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 # Check presence of pkg-config on the path