Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rev cmake minimum version from 3.14.2 to 3.14.5 #34757

Merged
merged 3 commits into from
Jun 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/workflow/requirements/linux-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
8 changes: 5 additions & 3 deletions eng/native/build-commons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14.2)
cmake_minimum_required(VERSION 3.14.5)

cmake_policy(SET CMP0042 NEW)

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/src/pal/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14.2)
cmake_minimum_required(VERSION 3.14.5)

# Compile options
add_definitions(-DLP64COMPATIBLE)
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/tests/src/profiler/native/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5.2)
cmake_minimum_required(VERSION 3.14.5)

project(Profiler)

Expand Down
2 changes: 1 addition & 1 deletion src/installer/corehost/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14.2)
cmake_minimum_required(VERSION 3.14.5)

project(corehost)

Expand Down
2 changes: 1 addition & 1 deletion src/installer/corehost/cli/test/mockhostfxr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
7 changes: 1 addition & 6 deletions src/libraries/Native/Unix/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/Native/Windows/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
2 changes: 1 addition & 1 deletion src/mono/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.10)
cmake_minimum_required (VERSION 3.14.5)

project (mono)

Expand Down