-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Convert CMakeSettings.json to CMakePresets.json for coreclr #89513
Conversation
Causes kernel32.lib (and others) not found when cmake tests compiler.
Tagging subscribers to this area: @hoyosjs Issue DetailsPart of #88688. Basically, add all variables from cmake_cmd_line.txt. The presets file is currently only used by IDE, but conversion of command line build for CLR should be straightforward. Currently only supports Windows because I didn't test other platforms. Corehost is a bit complicated and I'll try to include it later.
|
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.
Contributes to #88688
LGTM!
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.
Some notes for future potentials.
"generator": "Ninja", | ||
"binaryDir": "${sourceDir}/../../artifacts/obj/coreclr/${presetName}", | ||
"cacheVariables": { | ||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/../../artifacts/bin/coreclr/${presetName}" |
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.
The installDir
property is available since version 3.
"CLR_CMAKE_TARGET_OS": "windows", | ||
"CLI_CMAKE_FALLBACK_OS": "win10" |
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.
The varaible CMAKE_SYSTEM_VERSION is not set here. It seems to match exact Windows SDK version.
"name": "x86", | ||
"hidden": true, | ||
"architecture": { | ||
"value": "x86", |
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.
MSBuild uses Win32 while Ninja uses x86 here. May be difficult to implement a -msbuild
switch in the future.
{ | ||
"name": "base", | ||
"hidden": true, | ||
"generator": "Ninja", |
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.
Default since version 3.
Test failure looks unrelated. The files aren't affecting CLI build. |
Part of #88688.
Basically, add all variables from cmake_cmd_line.txt.
The presets file is currently only used by IDE, but conversion of command line build for CLR should be straightforward. Currently only supports Windows because I didn't test other platforms.
CMakePresets supports file importing and we can separated the file when fully depending on it.
Corehost is a bit complicated and I'll try to include it later.