Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vcpkg.cmake] error out if the mode has changed #13313

Merged

Conversation

strega-nil
Copy link
Contributor

I got a bug report earlier on discord where if a user:

  1. Doesn't have manifest mode turned on, and configures a cmake project with the vcpkg toolchain
  2. Turns on manifest mode and reconfigures

then the installed directory is set to the initial value (${VCPKG_ROOT}/installed), and we run vcpkg install with the manifest and that installed directory, which ends up deleting all the packages installed in that installed directory.

This makes certain that the manifest mode switch is constant across configurations, and requires a reconfigure if the configuration is faulty.

As a drive-by fix, switches VCPKG_MANIFEST_INSTALL to a CMAKE_DEPENDENT_OPTION.

Copy link
Contributor

@ras0219 ras0219 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming you've done sufficient local testing

@JackBoosY
Copy link
Contributor

Can you link to the related issue? Thanks.

@JackBoosY JackBoosY added category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) info:internal This PR or Issue was filed by the vcpkg team. labels Sep 3, 2020
@strega-nil
Copy link
Contributor Author

@JackBoosY the person never opened an issue.

@strega-nil strega-nil merged commit 619b294 into microsoft:master Sep 3, 2020
@strega-nil strega-nil deleted the dont-delete-installed-directory branch September 10, 2020 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants