Initial draft, not tested
This commit is contained in:
Родитель
cb43dbad1f
Коммит
0c9bba50b0
|
@ -125,12 +125,17 @@ export class CMakeFileApiDriver extends CMakeDriver {
|
|||
// We need to treat this case as if the cache is not present and let a reconfigure
|
||||
// refresh the cache information.
|
||||
const cacheExists: boolean = await fs.exists(this.cachePath);
|
||||
if (cacheExists && this.generator?.name === await this.getGeneratorFromCache(this.cachePath)) {
|
||||
await this.loadGeneratorInformationFromCache(this.cachePath);
|
||||
const code_model_exist = await this.updateCodeModel();
|
||||
if (!code_model_exist && this.config.configureOnOpen === true) {
|
||||
await this.doConfigure([], undefined, undefined);
|
||||
}
|
||||
if (cacheExists &&
|
||||
// this.generator?.toolset === await this.getToolsetFromCache(this.cachePath) &&
|
||||
// this.generator?.platform === await this.getPlatformFromCache(this.cachePath) &&
|
||||
this.generator?.name === await this.getGeneratorFromCache(this.cachePath)) {
|
||||
await this.loadGeneratorInformationFromCache(this.cachePath);
|
||||
// await this.loadPlatformInformationFromCache(this.cachePath);
|
||||
// await this.loadToolsetInformationFromCache(this.cachePath);
|
||||
const code_model_exist = await this.updateCodeModel();
|
||||
if (!code_model_exist && this.config.configureOnOpen === true) {
|
||||
await this.doConfigure([], undefined, undefined);
|
||||
}
|
||||
} else {
|
||||
// Do not delete the cache if configureOnOpen is false, which signals a project that may be
|
||||
// expected to be configured from outside VSCode and deleting the cache breaks that scenario.
|
||||
|
@ -148,6 +153,8 @@ export class CMakeFileApiDriver extends CMakeDriver {
|
|||
}
|
||||
|
||||
this._generatorInformation = this.generator;
|
||||
// this._platformInformation = this.platform;
|
||||
// this._toolsetInformation = this.toolset;
|
||||
}
|
||||
if (!this.generator && !this.useCMakePresets) {
|
||||
throw new NoGeneratorError();
|
||||
|
|
|
@ -967,7 +967,7 @@ async function getVSInstallForKit(kit: Kit): Promise<VSInstallation | undefined>
|
|||
const inst = installs.find(match);
|
||||
if (!inst) {
|
||||
log.warning(localize('vs.instance.not.found.run.scan.kits',
|
||||
'VS installation instance not found for kit {1}. It is recommended you re-scan the kits.',
|
||||
'VS installation instance not found for kit {0}. It is recommended you re-scan the kits.',
|
||||
kit?.visualStudio));
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче