aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src
diff options
context:
space:
mode:
authormartin-s <webmaster@macside.net>2017-09-02 16:48:29 +0200
committermartin-s <webmaster@macside.net>2017-09-02 16:48:29 +0200
commitc167c70c272a417779e601fffcbdb72278da1848 (patch)
tree2ec6baf82c7194e97f6960bccde5b79cf1ed3edf /toolsrc/src
parent35a9d223bc14fb4b35d6ad876d208897c8ce590a (diff)
downloadvcpkg-c167c70c272a417779e601fffcbdb72278da1848.tar.gz
vcpkg-c167c70c272a417779e601fffcbdb72278da1848.zip
- Added support for VS2013 build chain tools.
Diffstat (limited to 'toolsrc/src')
-rw-r--r--toolsrc/src/PostBuildLint.cpp8
-rw-r--r--toolsrc/src/VcpkgPaths.cpp50
2 files changed, 53 insertions, 5 deletions
diff --git a/toolsrc/src/PostBuildLint.cpp b/toolsrc/src/PostBuildLint.cpp
index 1fd48d3ec..33dc446cf 100644
--- a/toolsrc/src/PostBuildLint.cpp
+++ b/toolsrc/src/PostBuildLint.cpp
@@ -45,8 +45,8 @@ namespace vcpkg::PostBuildLint
{"msvcp100d.dll", R"(msvcp100d\.dll)"},
{"msvcp110.dll", R"(msvcp110\.dll)"},
{"msvcp110_win.dll", R"(msvcp110_win\.dll)"},
- {"msvcp120.dll", R"(msvcp120\.dll)"},
- {"msvcp120_clr0400.dll", R"(msvcp120_clr0400\.dll)"},
+ //{"msvcp120.dll", R"(msvcp120\.dll)"},
+ //{"msvcp120_clr0400.dll", R"(msvcp120_clr0400\.dll)"},
{"msvcp60.dll", R"(msvcp60\.dll)"},
{"msvcp60.dll", R"(msvcp60\.dll)"},
@@ -54,8 +54,8 @@ namespace vcpkg::PostBuildLint
{"msvcr100d.dll", R"(msvcr100d\.dll)"},
{"msvcr100_clr0400.dll", R"(msvcr100_clr0400\.dll)"},
{"msvcr110.dll", R"(msvcr110\.dll)"},
- {"msvcr120.dll", R"(msvcr120\.dll)"},
- {"msvcr120_clr0400.dll", R"(msvcr120_clr0400\.dll)"},
+ //{"msvcr120.dll", R"(msvcr120\.dll)"},
+ //{"msvcr120_clr0400.dll", R"(msvcr120_clr0400\.dll)"},
{"msvcrt20.dll", R"(msvcrt20\.dll)"},
{"msvcrt40.dll", R"(msvcrt40\.dll)"}};
diff --git a/toolsrc/src/VcpkgPaths.cpp b/toolsrc/src/VcpkgPaths.cpp
index 906a5e67f..71a35d24c 100644
--- a/toolsrc/src/VcpkgPaths.cpp
+++ b/toolsrc/src/VcpkgPaths.cpp
@@ -268,6 +268,19 @@ namespace vcpkg
return nullopt;
}
+
+ static Optional<fs::path> get_vs2013_installation_instance()
+ {
+ const Optional<std::wstring> vs2013_cmntools_optional = System::get_environment_variable(L"VS120COMNTOOLS");
+ if (const auto v = vs2013_cmntools_optional.get())
+ {
+ const fs::path vs2013_cmntools = fs::path(*v).parent_path(); // The call to parent_path() is needed because
+ // the env variable has a trailing backslash
+ return vs2013_cmntools.parent_path().parent_path();
+ }
+
+ return nullopt;
+ }
static std::vector<Toolset> find_toolset_instances(const VcpkgPaths& paths)
{
@@ -275,12 +288,46 @@ namespace vcpkg
const auto& fs = paths.get_filesystem();
- const std::vector<std::string> vs2017_installation_instances = get_vs2017_installation_instances(paths);
// Note: this will contain a mix of vcvarsall.bat locations and dumpbin.exe locations.
std::vector<fs::path> paths_examined;
std::vector<Toolset> found_toolsets;
+ // VS2013
+ const Optional<fs::path> vs_2013_installation_instance = get_vs2013_installation_instance();
+ if (const auto v = vs_2013_installation_instance.get())
+ {
+ const fs::path vs2013_vcvarsall_bat = *v / "VC" / "vcvarsall.bat";
+
+ paths_examined.push_back(vs2013_vcvarsall_bat);
+ if (fs.exists(vs2013_vcvarsall_bat))
+ {
+ const fs::path vs2013_dumpbin_exe = *v / "VC" / "bin" / "dumpbin.exe";
+ paths_examined.push_back(vs2013_dumpbin_exe);
+
+ const fs::path vs2013_bin_dir = vs2013_vcvarsall_bat.parent_path() / "bin";
+ std::vector<ToolsetArchOption> supported_architectures;
+ if (fs.exists(vs2013_bin_dir / "vcvars32.bat"))
+ supported_architectures.push_back({L"x86", CPU::X86, CPU::X86});
+ if (fs.exists(3 / "amd64\\vcvars64.bat"))
+ supported_architectures.push_back({L"x64", CPU::X64, CPU::X64});
+ if (fs.exists(vs2013_bin_dir / "x86_amd64\\vcvarsx86_amd64.bat"))
+ supported_architectures.push_back({L"x86_amd64", CPU::X86, CPU::X64});
+ if (fs.exists(vs2013_bin_dir / "x86_arm\\vcvarsx86_arm.bat"))
+ supported_architectures.push_back({L"x86_arm", CPU::X86, CPU::ARM});
+ if (fs.exists(vs2013_bin_dir / "amd64_x86\\vcvarsamd64_x86.bat"))
+ supported_architectures.push_back({L"amd64_x86", CPU::X64, CPU::X86});
+ if (fs.exists(vs2013_bin_dir / "amd64_arm\\vcvarsamd64_arm.bat"))
+ supported_architectures.push_back({L"amd64_arm", CPU::X64, CPU::ARM});
+
+ if (fs.exists(vs2013_dumpbin_exe))
+ {
+ found_toolsets.push_back(
+ {vs2013_dumpbin_exe, vs2013_vcvarsall_bat, L"v120", supported_architectures});
+ }
+ }
+ }
+
// VS2015
const Optional<fs::path> vs_2015_installation_instance = get_vs2015_installation_instance();
if (const auto v = vs_2015_installation_instance.get())
@@ -318,6 +365,7 @@ namespace vcpkg
// VS2017
Optional<Toolset> vs2017_toolset;
+ const std::vector<std::string> vs2017_installation_instances = get_vs2017_installation_instances(paths);
for (const std::string& instance : vs2017_installation_instances)
{
const fs::path vc_dir = fs::path{instance} / "VC";