You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
As it stands, in vcpkg.cmake it seems that when a manifest is detected we choose a folder in the CMAKE_BINARY_DIR rather than the vcpkg installation folder:
This is currently the case because it allows you with each new CMake build to detect possible port updates.
The problem with this approach is that it's slow, must iterate over all manifest dependencies and copy from the cache folder to the CMake output folder.
Take around 22seconds for my project: Total elapsed time: 22.95 s (and this each time i delete the cmake cache and generate again)
Proposed solution
First of all keep installed dir as it is: set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed)
^ This is much faster and safe (remove outdated dependencies, and installing only outdated one, and don't waste precious seconds on copying existing binaries from cache)
I would be more than happy to implement this approach, but i need to know if everyone agree with my approach before
This discussion was converted from issue #14430 on May 12, 2021 08:55.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is your feature request related to a problem? Please describe.
As it stands, in
vcpkg.cmake
it seems that when a manifest is detected we choose a folder in the CMAKE_BINARY_DIR rather than the vcpkg installation folder:https://github.com/microsoft/vcpkg/blob/master/scripts/buildsystems/vcpkg.cmake#L236
This is currently the case because it allows you with each new
CMake
build to detect possible port updates.The problem with this approach is that it's slow, must iterate over all manifest dependencies and copy from the cache folder to the CMake output folder.
Take around 22seconds for my project:
Total elapsed time: 22.95 s
(and this each time i delete the cmake cache and generate again)Proposed solution
First of all keep installed dir as it is:
set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed)
And instead of running install: https://github.com/microsoft/vcpkg/blob/master/scripts/buildsystems/vcpkg.cmake#L372
run it this way:
^ This is much faster and safe (remove outdated dependencies, and installing only outdated one, and don't waste precious seconds on copying existing binaries from cache)
I would be more than happy to implement this approach, but i need to know if everyone agree with my approach before
Describe alternatives you've considered
Additional context
my vcpkg.json:
Beta Was this translation helpful? Give feedback.
All reactions