cmake: Use vcpkg remove/install instead of upgrade.

vcpkg upgrade is currently broken, see:

https://github.com/microsoft/vcpkg/issues/9916

Use remove followed by install, which does practically the same thing,
as a workaround.

Hopefully fix current appveyor build failures.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2020-02-05 17:56:05 +00:00
parent 4aab08c47b
commit f1abbc5f83
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 6 additions and 1 deletions

View File

@ -159,7 +159,12 @@ function(vcpkg_set_toolchain)
if(DEFINED first_upgrade)
execute_process(
COMMAND ${vcpkg_exe} upgrade --no-dry-run ${first_upgrade}
COMMAND ${vcpkg_exe} remove ${first_upgrade}
WORKING_DIRECTORY ${VCPKG_ROOT}
)
execute_process(
COMMAND ${vcpkg_exe} install ${first_upgrade}
WORKING_DIRECTORY ${VCPKG_ROOT}
)
endif()