Skip to content

Commit

Permalink
Fixes vs2010 doesn't recognize host=x64
Browse files Browse the repository at this point in the history
  • Loading branch information
lygstate committed Oct 10, 2020
1 parent aa254ef commit 7138054
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/kit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -756,13 +756,18 @@ async function tryCreateNewVCEnvironment(inst: VSInstallation, hostArch: string,
log.debug(` InstallVersion: ${inst.installationVersion}`);
if (version) {
const generatorName: string|undefined = VsGenerators[version[1]];
let toolset = undefined;
// Visual Studio 2010 doesn't support for choose toolset host such as host=x64
if (kit.visualStudio !== "VisualStudio.10.0") {
toolset = "host=" + hostArch;
}
if (generatorName) {
log.debug(` ${localize('generator.present', 'Generator Present: {0}', generatorName)}`);
kit.preferredGenerator = {
name: generatorName,
platform: generatorPlatformFromVSArch[targetArch] as string || targetArch,
// CMake generator toolsets support also different versions (via -T version=).
toolset: "host=" + hostArch
toolset
};
}
log.debug(` ${localize('selected.preferred.generator.name', 'Selected Preferred Generator Name: {0} {1}', generatorName, JSON.stringify(kit.preferredGenerator))}`);
Expand Down

0 comments on commit 7138054

Please sign in to comment.