aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/VcpkgPaths.cpp
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-08-26 00:19:51 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-08-26 00:20:03 -0700
commit70949b0d814c469d76b8ddecc514ae0af6686347 (patch)
tree3b01ce11c0e6bb1cfbb4b67369fc58b5ef23d536 /toolsrc/src/VcpkgPaths.cpp
parentceb54bae8754f707bec17ac6ff3e35a32b0966e3 (diff)
downloadvcpkg-70949b0d814c469d76b8ddecc514ae0af6686347.tar.gz
vcpkg-70949b0d814c469d76b8ddecc514ae0af6686347.zip
[vcpkg] Use vcvars argument strings from detected toolset. Avoid c-string pointer comparison.
Diffstat (limited to 'toolsrc/src/VcpkgPaths.cpp')
-rw-r--r--toolsrc/src/VcpkgPaths.cpp37
1 files changed, 17 insertions, 20 deletions
diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp
index 642ca6a9c..7e3e5c736 100644
--- a/toolsrc/src/VcpkgPaths.cpp
+++ b/toolsrc/src/VcpkgPaths.cpp
@@ -302,25 +302,24 @@ namespace vcpkg
paths_examined.push_back(vs2015_dumpbin_exe);
const fs::path vs2015_bin_dir = vs2015_vcvarsall_bat.parent_path() / "bin";
- std::vector<ToolsetArchOption> supported_archictectures;
- if(fs.exists(vs2015_bin_dir / "vcvars32.bat"))
- supported_archictectures.push_back({L"x86", CPU::X86, CPU::X86});
+ std::vector<ToolsetArchOption> supported_architectures;
+ if (fs.exists(vs2015_bin_dir / "vcvars32.bat"))
+ supported_architectures.push_back({L"x86", CPU::X86, CPU::X86});
if (fs.exists(vs2015_bin_dir / "amd64\\vcvars64.bat"))
- supported_archictectures.push_back({L"x64", CPU::X64, CPU::X64});
- if (fs.exists(vs2015_bin_dir / "arm\\vcvarsarm.bat"))
- supported_archictectures.push_back({L"arm", CPU::ARM, CPU::ARM});
+ supported_architectures.push_back({L"x64", CPU::X64, CPU::X64});
if (fs.exists(vs2015_bin_dir / "x86_amd64\\vcvarsx86_amd64.bat"))
- supported_archictectures.push_back({L"x86_amd64", CPU::X86, CPU::X64});
+ supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64});
if (fs.exists(vs2015_bin_dir / "x86_arm\\vcvarsx86_arm.bat"))
- supported_archictectures.push_back({L"x86_arm" , CPU::X86, CPU::ARM});
+ supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM});
if (fs.exists(vs2015_bin_dir / "amd64_x86\\vcvarsamd64_x86.bat"))
- supported_archictectures.push_back({L"amd64_x86", CPU::X64, CPU::X86});
+ supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86});
if (fs.exists(vs2015_bin_dir / "amd64_arm\\vcvarsamd64_arm.bat"))
- supported_archictectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM});
+ supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM});
if (fs.exists(vs2015_dumpbin_exe))
{
- found_toolsets.push_back({vs2015_dumpbin_exe, vs2015_vcvarsall_bat, L"v140", supported_archictectures });
+ found_toolsets.push_back(
+ {vs2015_dumpbin_exe, vs2015_vcvarsall_bat, L"v140", supported_architectures});
}
}
}
@@ -337,22 +336,20 @@ namespace vcpkg
paths_examined.push_back(vcvarsall_bat);
if (!fs.exists(vcvarsall_bat)) continue;
- //Get all supported architecturs
+ // Get all supported architectures
std::vector<ToolsetArchOption> supported_architectures;
if (fs.exists(vcvarsall_dir / "vcvars32.bat"))
- supported_architectures.push_back({L"x86", CPU::X86,CPU::X86 });
+ supported_architectures.push_back({L"x86", CPU::X86, CPU::X86});
if (fs.exists(vcvarsall_dir / "vcvars64.bat"))
- supported_architectures.push_back({L"amd64", CPU::X64,CPU::X64 });
- if (fs.exists(vcvarsall_dir / "vcvarsarm.bat"))
- supported_architectures.push_back({L"arm", CPU::ARM,CPU::ARM });
+ supported_architectures.push_back({L"amd64", CPU::X64, CPU::X64});
if (fs.exists(vcvarsall_dir / "vcvarsx86_amd64.bat"))
- supported_architectures.push_back({L"x86_amd64",CPU::X86,CPU::X64 });
+ supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64});
if (fs.exists(vcvarsall_dir / "vcvarsx86_arm.bat"))
- supported_architectures.push_back({L"x86_arm", CPU::X86,CPU::ARM });
+ supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM});
if (fs.exists(vcvarsall_dir / "vcvarsamd64_x86.bat"))
- supported_architectures.push_back({L"amd64_x86", CPU::X64,CPU::X86 });
+ supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86});
if (fs.exists(vcvarsall_dir / "vcvarsamd64_arm.bat"))
- supported_architectures.push_back({L"amd64_arm", CPU::X64,CPU::ARM });
+ supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM});
// Locate the "best" MSVC toolchain version
const fs::path msvc_path = vc_dir / "Tools" / "MSVC";