Search code examples
c++vcpkg

C++ - Speed up installs using vcpkg


I am new to C++ and needed to download a package, so I thought I would use vcpkg. The problem is vcpkg was slower than I expected. Here is my syntax:

vcpkg install <PACKAGE>

Vcpkg takes a lot of time, which makes me wonder if there is a flag to speed up the vcpkg download speed.


Solution

  • vcpkg does not download pre-built binaries; it downloads source files and does the builds on your machine.

    Therefore, it is most likely not the download that is taking up a lot of time, but the build itself. There is no flag that can speed up the builds, but it is possible to export binaries, so you really only have to build a specific set of libraries only once.

    If you are interested in why vcpkg chooses to be source-based as opposed to binary-based, you can consult this