mirror of https://github.com/aminya/setup-cpp
feat: refactor activateMSVC
This commit is contained in:
parent
b7eaefbab7
commit
dcedb6e575
|
@ -64,6 +64,17 @@ export async function setupMSVC(
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
error(e as string | Error)
|
error(e as string | Error)
|
||||||
}
|
}
|
||||||
|
activateMSVC(VCTargetsPath, arch, toolset, sdk, uwp, spectre)
|
||||||
|
}
|
||||||
|
|
||||||
|
function activateMSVC(
|
||||||
|
VCTargetsPath: string | undefined,
|
||||||
|
arch: string,
|
||||||
|
toolset: string | undefined,
|
||||||
|
sdk?: string,
|
||||||
|
uwp?: boolean,
|
||||||
|
spectre?: boolean
|
||||||
|
) {
|
||||||
if (VCTargetsPath !== undefined && existsSync(VCTargetsPath)) {
|
if (VCTargetsPath !== undefined && existsSync(VCTargetsPath)) {
|
||||||
exportVariable("VCTargetsPath", VCTargetsPath)
|
exportVariable("VCTargetsPath", VCTargetsPath)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue