Convert CMakeSettings.json to CMakePresets.json for coreclr (#89513)

This commit is contained in:
Huo Yaoyuan 2023-08-08 01:08:23 +08:00 committed by GitHub
parent 8917ca24d6
commit c37f6c36ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 170 additions and 78 deletions

1
.gitignore vendored
View File

@ -326,6 +326,7 @@ Vagrantfile
CMakeFiles/ CMakeFiles/
cmake_install.cmake cmake_install.cmake
CMakeCache.txt CMakeCache.txt
CMakeUserPresets.json
# Cross compilation # Cross compilation
cross/rootfs/* cross/rootfs/*

View File

@ -0,0 +1,169 @@
{
"version": 2,
"cmakeMinimumRequired": {
"major": 3,
"minor": 20
},
"configurePresets": [
{
"name": "base",
"hidden": true,
"generator": "Ninja",
"binaryDir": "${sourceDir}/../../artifacts/obj/coreclr/${presetName}",
"cacheVariables": {
"CMAKE_INSTALL_PREFIX": "${sourceDir}/../../artifacts/bin/coreclr/${presetName}"
}
},
{
"name": "windows-base",
"hidden": true,
"inherits": "base",
"cacheVariables": {
"CLR_CMAKE_TARGET_OS": "windows",
"CLI_CMAKE_FALLBACK_OS": "win10"
},
"vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": {
"hostOS": [
"Windows"
]
}
}
},
{
"name": "Debug",
"hidden": true,
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "Release",
"hidden": true,
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "Checked",
"hidden": true,
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Checked"
}
},
{
"name": "x64",
"hidden": true,
"architecture": {
"value": "x64",
"strategy": "external"
},
"cacheVariables": {
"CLR_CMAKE_HOST_ARCH": "x64"
}
},
{
"name": "x86",
"hidden": true,
"architecture": {
"value": "x86",
"strategy": "external"
},
"cacheVariables": {
"CLR_CMAKE_HOST_ARCH": "x86"
}
},
{
"name": "ARM64",
"hidden": true,
"architecture": {
"value": "ARM64",
"strategy": "external"
},
"cacheVariables": {
"CLR_CMAKE_HOST_ARCH": "ARM64"
}
},
{
"name": "windows.x64.Debug",
"displayName": "windows.x64.Debug",
"inherits": [
"windows-base",
"Debug",
"x64"
]
},
{
"name": "windows.x64.Release",
"displayName": "windows.x64.Release",
"inherits": [
"windows-base",
"Release",
"x64"
]
},
{
"name": "windows.x64.Checked",
"displayName": "windows.x64.Checked",
"inherits": [
"windows-base",
"Checked",
"x64"
]
},
{
"name": "windows.x86.Debug",
"displayName": "windows.x86.Debug",
"inherits": [
"windows-base",
"Debug",
"x86"
]
},
{
"name": "windows.x86.Release",
"displayName": "windows.x86.Release",
"inherits": [
"windows-base",
"Release",
"x86"
]
},
{
"name": "windows.x86.Checked",
"displayName": "windows.x86.Checked",
"inherits": [
"windows-base",
"Checked",
"x86"
]
},
{
"name": "windows.arm64.Debug",
"displayName": "windows.arm64.Debug",
"inherits": [
"windows-base",
"Debug",
"ARM64"
]
},
{
"name": "windows.arm64.Release",
"displayName": "windows.arm64.Release",
"inherits": [
"windows-base",
"Release",
"ARM64"
]
},
{
"name": "windows.arm64.Checked",
"displayName": "windows.arm64.Checked",
"inherits": [
"windows-base",
"Checked",
"ARM64"
]
}
]
}

View File

@ -1,78 +0,0 @@
{
"environments": [
{
"artifactsBin": "${projectDir}\\..\\..\\artifacts\\bin\\coreclr",
"artifactsObj": "${projectDir}\\..\\..\\artifacts\\obj\\coreclr"
}
],
"configurations": [
{
"name": "windows.x64.Debug",
"generator": "Ninja",
"configurationType": "Debug",
"buildRoot": "${env.artifactsObj}\\${name}",
"installRoot": "${env.artifactsBin}\\${name}",
"cmakeCommandArgs": "-DCLR_CMAKE_HOST_ARCH=x64 -DCLI_CMAKE_FALLBACK_OS=win",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64" ]
},
{
"name": "windows.x64.Release",
"generator": "Ninja",
"configurationType": "Release",
"buildRoot": "${env.artifactsObj}\\${name}",
"installRoot": "${env.artifactsBin}\\${name}",
"cmakeCommandArgs": "-DCLR_CMAKE_HOST_ARCH=x64 -DCLI_CMAKE_FALLBACK_OS=win",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64" ]
},
{
"name": "windows.x86.Debug",
"generator": "Ninja",
"configurationType": "Debug",
"buildRoot": "${env.artifactsObj}\\${name}",
"installRoot": "${env.artifactsBin}\\${name}",
"cmakeCommandArgs": "-DCLR_CMAKE_HOST_ARCH=x86 -DCLI_CMAKE_FALLBACK_OS=win",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x86" ]
},
{
"name": "windows.x86.Release",
"generator": "Ninja",
"configurationType": "Release",
"buildRoot": "${env.artifactsObj}\\${name}",
"installRoot": "${env.artifactsBin}\\${name}",
"cmakeCommandArgs": "-DCLR_CMAKE_HOST_ARCH=x86 -DCLI_CMAKE_FALLBACK_OS=win",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x86" ]
},
{
"name": "windows.arm64.Debug",
"generator": "Ninja",
"configurationType": "Debug",
"buildRoot": "${env.artifactsObj}\\${name}",
"installRoot": "${env.artifactsBin}\\${name}",
"cmakeCommandArgs": "-DCLR_CMAKE_HOST_ARCH=arm64 -DCLI_CMAKE_FALLBACK_OS=win",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_arm64" ],
"variables": []
},
{
"name": "windows.arm64.Release",
"generator": "Ninja",
"configurationType": "Release",
"buildRoot": "${env.artifactsObj}\\${name}",
"installRoot": "${env.artifactsBin}\\${name}",
"cmakeCommandArgs": "-DCLR_CMAKE_HOST_ARCH=arm64 -DCLI_CMAKE_FALLBACK_OS=win",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_arm64" ],
"variables": []
}
]
}