diff --git a/docs/workflow/requirements/linux-requirements.md b/docs/workflow/requirements/linux-requirements.md index 34772c9cc29fbc..0cdd9cc399784c 100644 --- a/docs/workflow/requirements/linux-requirements.md +++ b/docs/workflow/requirements/linux-requirements.md @@ -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 . You may need to add LLVM's APT feed to your configuration to obtain the required version of clang/LLVM. See their instructions at . +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 . You may need to add LLVM's APT feed to your configuration to obtain the required version of clang/LLVM. See their instructions at . Install the following packages for the toolchain: diff --git a/eng/native/build-commons.sh b/eng/native/build-commons.sh index c231a01d429570..31d8d8b663f5fe 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 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 diff --git a/global.json b/global.json index a29a4d4a61cb40..ca4dc75f38e3b0 100644 --- a/global.json +++ b/global.json @@ -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": { diff --git a/src/coreclr/CMakeLists.txt b/src/coreclr/CMakeLists.txt index efad61086e853d..e684f778d85f55 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 b6d9fe2d44eb8f..d6f9fa55543a89 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 53dbb85a58b764..75beaaf36ae5ec 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 3de1e8b7c1c0ab..cd5182062c18a0 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 4fa7f45b42ab00..2343e3a7418882 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 bcf6a051229559..3352dd48d5149b 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 aafa771b5a775f..6c1c4ea45861bc 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_BROWSER) cmake_policy(SET CMP0083 NEW) endif(NOT CLR_CMAKE_TARGET_BROWSER) diff --git a/src/libraries/Native/Windows/CMakeLists.txt b/src/libraries/Native/Windows/CMakeLists.txt index 9f4053485e4987..55f310b82742f6 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 b1f71398f834ae..574f039b16623c 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)