fix: specify the toolset

This commit is contained in:
Amin Yahyaabadi 2021-12-05 08:56:34 -06:00
parent 73ec89a099
commit a381fc0e98
4 changed files with 8 additions and 7 deletions

View File

@ -15,10 +15,11 @@ The package can be used locally or from CI services like GitHub Actions. Stay tu
`setup-cpp` can install all of these tools: `setup-cpp` can install all of these tools:
- llvm
- gcc
- cmake - cmake
- ninja - ninja
- llvm
- gcc
- msvc
- vcvarsall - vcvarsall
- vcpkg - vcpkg
- meson - meson

2
dist/setup_cpp.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -22,7 +22,7 @@ export async function setupMSVC(
// https://github.com/aminya/setup-cpp/issues/1 // https://github.com/aminya/setup-cpp/issues/1
try { try {
if (version === "2015") { if (version === "2015") {
// toolset = "14.0.25420.1" toolset = "14.0.25420.1"
await setupChocoPack("visualcpp-build-tools", toolset, [ await setupChocoPack("visualcpp-build-tools", toolset, [
"--ignore-dependencies", "--ignore-dependencies",
"--params", "--params",
@ -34,14 +34,14 @@ export async function setupMSVC(
exportVariable("VCTargetsPath", VCTargetsPath) exportVariable("VCTargetsPath", VCTargetsPath)
} }
} else if (version === "2017") { } else if (version === "2017") {
// toolset = "14.16" toolset = "14.16"
await setupChocoPack("visualstudio2017buildtools", "15.9.41.0", [ await setupChocoPack("visualstudio2017buildtools", "15.9.41.0", [
"--package-parameters", "--package-parameters",
"'--add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --passive'", "'--add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --passive'",
]) ])
// VCTargetsPath = "C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16" // TODO verify path // VCTargetsPath = "C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16" // TODO verify path
} else if (version === "2019") { } else if (version === "2019") {
// toolset = "14.29.30133" toolset = "14.29"
await setupChocoPack("visualstudio2019buildtools", "16.11.7.0", [ await setupChocoPack("visualstudio2019buildtools", "16.11.7.0", [
"--package-parameters", "--package-parameters",
"'--add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --passive'", "'--add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --passive'",