-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Up Minimum CMake Version to 3.20 #86530
Changes from all commits
d4d35cb
340a919
42c8ddf
ce9a4f8
b138c9e
1567280
0e007df
d519a08
4cd3855
b6dc71d
ad08a84
47586b9
bab4979
72795e7
f3ebb36
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ Building _dotnet/runtime_ depends on several tools to be installed. You can down | |
|
||
Install the following packages: | ||
|
||
* CMake 3.15.5 or newer | ||
* CMake 3.20 or newer | ||
* icu4c | ||
* [email protected] or openssl@3 | ||
* pkg-config | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,9 @@ | ||
cmake_minimum_required(VERSION 3.6.2) | ||
cmake_minimum_required(VERSION 3.20) | ||
|
||
cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH is enabled by default. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we still need to set these policies individually after specifying minimum required version 3.20?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We plan to update the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you want to keep this PR as minimal as possible and keep cleanup for later, this block can stay as is. The |
||
|
||
if (CMAKE_VERSION VERSION_GREATER 3.7 OR CMAKE_VERSION VERSION_EQUAL 3.7) | ||
cmake_policy(SET CMP0066 NEW) # Honor per-config flags in try_compile() source-file signature. | ||
endif() | ||
if (CMAKE_VERSION VERSION_GREATER 3.8 OR CMAKE_VERSION VERSION_EQUAL 3.8) | ||
cmake_policy(SET CMP0067 NEW) # Honor language standard in try_compile() source-file signature | ||
endif() | ||
if (CMAKE_VERSION VERSION_GREATER 3.15 OR CMAKE_VERSION VERSION_EQUAL 3.15) | ||
cmake_policy(SET CMP0091 NEW) # MSVC runtime library flags are selected by an abstraction. | ||
endif() | ||
cmake_policy(SET CMP0066 NEW) # Honor per-config flags in try_compile() source-file signature. | ||
cmake_policy(SET CMP0067 NEW) # Honor language standard in try_compile() source-file signature | ||
cmake_policy(SET CMP0091 NEW) # MSVC runtime library flags are selected by an abstraction. | ||
|
||
# Set the project name | ||
project(CoreCLR) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
cmake_minimum_required(VERSION 3.14.5) | ||
cmake_minimum_required(VERSION 3.20) | ||
|
||
project(mono-wasi-runtime C) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
cmake_minimum_required(VERSION 3.14.5) | ||
cmake_minimum_required(VERSION 3.20) | ||
|
||
project(mono-wasm-runtime C) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
cmake_minimum_required(VERSION 3.14.5) | ||
cmake_minimum_required(VERSION 3.20) | ||
|
||
project(Profiler) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should mention something in the section about the
-msbuild
flag that CMake 3.21 is required to use that flag (maybe we can add validation of that at some point?)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds good to me. Do you mean that on Windows, if you have CMake 3.21 or later, you have to always use the
-msbuild
flag? As in:Otherwise it will fail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite. I mean if you want to use the
-msbuild
flag on Windows, you need at least CMake 3.21 as the VS2022 generator doesn't exist in CMake until that version.