presets
cmake --preset=windows-only
// CMakePresets.json or CMakeUserPresets.json
{
"version": 6,
"cmakeMinimumRequired": {
"major": 3,
"minor": 27,
"patch": 0
},
"configurePresets": [
{
"name": "default",
"displayName": "Default Config"
},
{
"name": "windows-only",
"inherits": "default",
"displayName": "Windows-only configuration",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"cacheVariables": {
"Boost_ROOT": "C:/xxx/xxx"
}
}
]
}
标签:Cmake,Windows,json,windows,only,使用,displayName
From: https://www.cnblogs.com/cynhard/p/17611749.html