aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-01-23 19:25:47 -0800
committerAlexander Karatarakis <alkarata@microsoft.com>2017-01-23 19:25:47 -0800
commit93c3c0648a782b1fa75bae1f200beca6ba871f9a (patch)
tree71bd4a950706baf0810b923ad09bcf0d583755b4 /toolsrc/src
parent7c9db95feccf6e9d01d2e1af6c7012685d8e46b6 (diff)
downloadvcpkg-93c3c0648a782b1fa75bae1f200beca6ba871f9a.tar.gz
vcpkg-93c3c0648a782b1fa75bae1f200beca6ba871f9a.zip
[VS2017] Enable building with v141 toolset
Diffstat (limited to 'toolsrc/src')
-rw-r--r--toolsrc/src/commands_build.cpp7
-rw-r--r--toolsrc/src/vcpkg_Environment.cpp10
2 files changed, 9 insertions, 8 deletions
diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp
index af1b3dc24..d9d5d2107 100644
--- a/toolsrc/src/commands_build.cpp
+++ b/toolsrc/src/commands_build.cpp
@@ -30,12 +30,13 @@ namespace vcpkg::Commands::Build
const triplet& target_triplet = spec.target_triplet();
const fs::path ports_cmake_script_path = paths.ports_cmake;
- const fs::path vcvarsall_bat = Environment::get_vcvarsall_bat(paths);
- const std::wstring command = Strings::wformat(LR"("%s" %s && cmake -DCMD=BUILD -DPORT=%s -DTARGET_TRIPLET=%s "-DCURRENT_PORT_DIR=%s/." -P "%s")",
- vcvarsall_bat.native(),
+ const Environment::vcvarsall_and_platform_toolset vcvarsall_bat = Environment::get_vcvarsall_bat(paths);
+ const std::wstring command = Strings::wformat(LR"("%s" %s && cmake -DCMD=BUILD -DPORT=%s -DTARGET_TRIPLET=%s -DVCPKG_PLATFORM_TOOLSET=%s "-DCURRENT_PORT_DIR=%s/." -P "%s")",
+ vcvarsall_bat.path.native(),
Strings::utf8_to_utf16(target_triplet.architecture()),
Strings::utf8_to_utf16(source_paragraph.name),
Strings::utf8_to_utf16(target_triplet.canonical_name()),
+ vcvarsall_bat.platform_toolset,
port_dir.generic_wstring(),
ports_cmake_script_path.generic_wstring());
diff --git a/toolsrc/src/vcpkg_Environment.cpp b/toolsrc/src/vcpkg_Environment.cpp
index 1a50a604a..c204bfaf4 100644
--- a/toolsrc/src/vcpkg_Environment.cpp
+++ b/toolsrc/src/vcpkg_Environment.cpp
@@ -167,7 +167,7 @@ namespace vcpkg::Environment
return dumpbin_exe;
}
- static fs::path find_vcvarsall_bat(const vcpkg_paths& paths)
+ static vcvarsall_and_platform_toolset find_vcvarsall_bat(const vcpkg_paths& paths)
{
const std::vector<std::string> vs2017_installation_instances = get_VS2017_installation_instances(paths);
std::vector<fs::path> paths_examined;
@@ -179,7 +179,7 @@ namespace vcpkg::Environment
paths_examined.push_back(vcvarsall_bat);
if (fs::exists(vcvarsall_bat))
{
- return vcvarsall_bat;
+ return { vcvarsall_bat , L"v141"};
}
}
@@ -188,7 +188,7 @@ namespace vcpkg::Environment
paths_examined.push_back(vs2015_vcvarsall_bat);
if (fs::exists(vs2015_vcvarsall_bat))
{
- return vs2015_vcvarsall_bat;
+ return { vs2015_vcvarsall_bat, L"v140" };
}
System::println(System::color::error, "Could not detect vccarsall.bat.");
@@ -200,9 +200,9 @@ namespace vcpkg::Environment
exit(EXIT_FAILURE);
}
- const fs::path& get_vcvarsall_bat(const vcpkg_paths& paths)
+ const vcvarsall_and_platform_toolset& get_vcvarsall_bat(const vcpkg_paths& paths)
{
- static const fs::path vcvarsall_bat = find_vcvarsall_bat(paths);
+ static const vcvarsall_and_platform_toolset vcvarsall_bat = find_vcvarsall_bat(paths);
return vcvarsall_bat;
}
}