Add support for CMake Presets V5 (#2995)
This commit is contained in:
Родитель
dc0bd4b4f7
Коммит
f666577a98
|
@ -3,6 +3,7 @@
|
|||
## 1.14
|
||||
Improvements:
|
||||
- Add an optional description field to kits. [PR #2944](https://github.com/microsoft/vscode-cmake-tools/pull/2944) [@TisziV](https://github.com/TisziV)
|
||||
- Add support for CMake Presets V5. [#2979](https://github.com/microsoft/vscode-cmake-tools/issues/2979)
|
||||
|
||||
Bug Fixes:
|
||||
- Check if "CMakeLists.txt" exists after renaming. [#2986](https://github.com/microsoft/vscode-cmake-tools/issues/2986)
|
||||
|
|
|
@ -2072,11 +2072,11 @@
|
|||
},
|
||||
{
|
||||
"fileMatch": "CMakePresets.json",
|
||||
"url": "cmake-tools-schema:///schemas/CMakePresets-v4-schema.json"
|
||||
"url": "cmake-tools-schema:///schemas/CMakePresets-v5-schema.json"
|
||||
},
|
||||
{
|
||||
"fileMatch": "CMakeUserPresets.json",
|
||||
"url": "cmake-tools-schema:///schemas/CMakePresets-v4-schema.json"
|
||||
"url": "cmake-tools-schema:///schemas/CMakePresets-v5-schema.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -274,6 +274,7 @@ export interface OutputOptions {
|
|||
subprojectSummary?: boolean;
|
||||
maxPassedTestOutputSize?: number;
|
||||
maxFailedTestOutputSize?: number;
|
||||
testOutputTruncation?: 'tail' | 'heads' | 'middle';
|
||||
maxTestNameWidth?: number;
|
||||
}
|
||||
|
||||
|
@ -590,6 +591,9 @@ async function getExpansionOptions(workspaceFolder: string, sourceDir: string, p
|
|||
if (preset.__file && preset.__file.version >= 4) {
|
||||
expansionOpts.vars['fileDir'] = path.dirname(preset.__file!.__path!);
|
||||
}
|
||||
if (preset.__file && preset.__file.version >= 5) {
|
||||
expansionOpts.vars['pathListSep'] = path.delimiter;
|
||||
}
|
||||
|
||||
return expansionOpts;
|
||||
}
|
||||
|
@ -1576,6 +1580,7 @@ export function testArgs(preset: TestPreset): string[] {
|
|||
preset.output.subprojectSummary === false && result.push('--no-subproject-summary');
|
||||
preset.output.maxPassedTestOutputSize && result.push('--test-output-size-passed', preset.output.maxPassedTestOutputSize.toString());
|
||||
preset.output.maxFailedTestOutputSize && result.push('--test-output-size-failed', preset.output.maxFailedTestOutputSize.toString());
|
||||
preset.output.testOutputTruncation && result.push('--test-output-truncation', preset.output.testOutputTruncation.toString());
|
||||
preset.output.maxTestNameWidth && result.push('--max-width', preset.output.maxTestNameWidth.toString());
|
||||
}
|
||||
|
||||
|
|
|
@ -1076,8 +1076,10 @@ export class PresetsController {
|
|||
schemaFile = 'schemas/CMakePresets-schema.json';
|
||||
} else if (presetsFile.version === 3) {
|
||||
schemaFile = 'schemas/CMakePresets-v3-schema.json';
|
||||
} else {
|
||||
} else if (presetsFile.version === 4) {
|
||||
schemaFile = 'schemas/CMakePresets-v4-schema.json';
|
||||
} else {
|
||||
schemaFile = 'schemas/CMakePresets-v5-schema.json';
|
||||
}
|
||||
const validator = await loadSchema(schemaFile);
|
||||
const is_valid = validator(presetsFile);
|
||||
|
|
Загрузка…
Ссылка в новой задаче