diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2019-01-29 13:49:45 -0800 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2019-01-30 14:27:10 -0800 |
| commit | 74e0c1a7849a898ddd5bd6863bf191dc2a60ddef (patch) | |
| tree | c80b44f2dd96cf61976d19adbe5768072ba60fe9 /toolsrc/src | |
| parent | 660745956a59f58bc95b1802b2d08ddaeff37eb7 (diff) | |
| download | vcpkg-74e0c1a7849a898ddd5bd6863bf191dc2a60ddef.tar.gz vcpkg-74e0c1a7849a898ddd5bd6863bf191dc2a60ddef.zip | |
[vcpkg] Add additional checks for 32-bit hosted and targetting windows store when using VS2019
Diffstat (limited to 'toolsrc/src')
| -rw-r--r-- | toolsrc/src/vcpkg/vcpkgpaths.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index a92a5673e..47994660c 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -192,6 +192,26 @@ namespace vcpkg vs_root_path.generic_string()); } + if (prebuildinfo.cmake_system_name == "WindowsStore") + { + // For now, cmake does not support VS 2019 when using the MSBuild generator. + Util::erase_remove_if(candidates, [&](const Toolset* t) { return t->version == "v142"; }); + Checks::check_exit(VCPKG_LINE_INFO, + !candidates.empty(), + "With the current CMake version, UWP binaries can only be built with toolset version " + "v141 or below. Please install the v141 toolset in VS 2019."); + } + + if (System::get_host_processor() == System::CPUArchitecture::X86) + { + // For now, cmake does not support VS 2019 when using the MSBuild generator. + Util::erase_remove_if(candidates, [&](const Toolset* t) { return t->version == "v142"; }); + Checks::check_exit(VCPKG_LINE_INFO, + !candidates.empty(), + "With the current CMake version, 32-bit machines can build with toolset version " + "v141 or below. Please install the v141 toolset in VS 2019."); + } + Checks::check_exit(VCPKG_LINE_INFO, !candidates.empty(), "No suitable Visual Studio instances were found"); return *candidates.front(); |
