103 lines
3.4 KiB
JSON
103 lines
3.4 KiB
JSON
{
|
|
"version": 3,
|
|
"configurePresets": [
|
|
{
|
|
"name": "base-preset",
|
|
"hidden": true,
|
|
"description": "所有预设的基类",
|
|
"binaryDir": "${sourceDir}/build/${presetName}",
|
|
"cacheVariables": {
|
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
|
|
}
|
|
},
|
|
{
|
|
"name": "ninja-base",
|
|
"hidden": true,
|
|
"inherits": "base-preset",
|
|
"generator": "Ninja"
|
|
},
|
|
{
|
|
"name": "linux-gcc-debug",
|
|
"displayName": "Linux (GCC Debug)",
|
|
"description": "适用于 Linux 系统的 GCC 调试配置",
|
|
"inherits": "ninja-base",
|
|
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Linux" },
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": "Debug",
|
|
"CMAKE_C_COMPILER": "gcc"
|
|
}
|
|
},
|
|
{
|
|
"name": "linux-clang-release",
|
|
"displayName": "Linux (Clang Release)",
|
|
"description": "适用于 Linux 系统的 Clang 发行配置",
|
|
"inherits": "ninja-base",
|
|
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Linux" },
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": "Release",
|
|
"CMAKE_C_COMPILER": "clang"
|
|
}
|
|
},
|
|
{
|
|
"name": "windows-msvc-debug",
|
|
"displayName": "Windows (MSVC 2022 Debug)",
|
|
"description": "适用于 Windows 的 Visual Studio 2022 调试",
|
|
"inherits": "base-preset",
|
|
"generator": "Visual Studio 17 2022",
|
|
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows" },
|
|
"architecture": "x64",
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": "Debug"
|
|
}
|
|
},
|
|
{
|
|
"name": "windows-clang-debug",
|
|
"displayName": "Windows (ClangCL Debug)",
|
|
"description": "在 Windows 上使用 MSVC 工具链下的 Clang",
|
|
"inherits": "base-preset",
|
|
"generator": "Visual Studio 17 2022",
|
|
"toolset": "ClangCL",
|
|
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows" },
|
|
"architecture": "x64"
|
|
},
|
|
{
|
|
"name": "macos-clang-debug",
|
|
"displayName": "macOS (AppleClang Debug)",
|
|
"description": "适用于 macOS 的自带 Clang 调试配置",
|
|
"inherits": "ninja-base",
|
|
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Darwin" },
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": "Debug"
|
|
}
|
|
},
|
|
{
|
|
"name": "freebsd-clang-debug",
|
|
"displayName": "FreeBSD (Clang Debug)",
|
|
"description": "适用于 FreeBSD 的系统默认 Clang 配置",
|
|
"inherits": "ninja-base",
|
|
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "FreeBSD" },
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": "Debug",
|
|
"CMAKE_C_COMPILER": "clang"
|
|
}
|
|
},
|
|
{
|
|
"name": "windows-mingw-debug",
|
|
"displayName": "Windows (MinGW GCC Debug)",
|
|
"description": "适用于 Windows 系统的 MinGW GCC 调试配置",
|
|
"inherits": "ninja-base",
|
|
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows" },
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": "Debug",
|
|
"CMAKE_C_COMPILER": "gcc"
|
|
}
|
|
}
|
|
],
|
|
"buildPresets": [
|
|
{ "name": "build-linux-gcc", "configurePreset": "linux-gcc-debug" },
|
|
{ "name": "build-windows-msvc", "configurePreset": "windows-msvc-debug" },
|
|
{ "name": "build-macos-clang", "configurePreset": "macos-clang-debug" },
|
|
{ "name": "build-freebsd-clang", "configurePreset": "freebsd-clang-debug" }
|
|
]
|
|
}
|