diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-02-23 04:35:00 -0800 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-02-23 04:35:00 -0800 |
| commit | 4b9f258c70d78a9e2d954eea7017bfb0f371cfbb (patch) | |
| tree | 4ff7bf39ddecd0f404c141c0175cc56b42a7bc08 /toolsrc/src/commands_build.cpp | |
| parent | dd6d1aa560985c4b508f6f0f5259e03ddfaba262 (diff) | |
| download | vcpkg-4b9f258c70d78a9e2d954eea7017bfb0f371cfbb.tar.gz vcpkg-4b9f258c70d78a9e2d954eea7017bfb0f371cfbb.zip | |
[vcpkg] Fix bug when building v141@64-bit from a v140@32-bit prompt
Diffstat (limited to 'toolsrc/src/commands_build.cpp')
| -rw-r--r-- | toolsrc/src/commands_build.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp index ec4124922..2159cec2c 100644 --- a/toolsrc/src/commands_build.cpp +++ b/toolsrc/src/commands_build.cpp @@ -37,6 +37,10 @@ namespace vcpkg::Commands::Build } } + // If these environment variables are set while running the VS2017 developer prompt, it will not correctly initialize the build environment. + _wputenv_s(L"VSINSTALLDIR", L""); + _wputenv_s(L"DevEnvDir", L""); + const fs::path ports_cmake_script_path = paths.ports_cmake; const Environment::vcvarsall_and_platform_toolset vcvarsall_bat = Environment::get_vcvarsall_bat(paths); const std::wstring command = Strings::wformat(LR"("%s" %s >nul 2>&1 && cmake -DCMD=BUILD -DPORT=%s -DTARGET_TRIPLET=%s -DVCPKG_PLATFORM_TOOLSET=%s "-DCURRENT_PORT_DIR=%s/." -P "%s")", |
