Vcpkg: Change default triplet

Created on 21 Sep 2016  路  13Comments  路  Source: microsoft/vcpkg

The default triplet is "x86-windows".

Since we mainly develop very memory demanding applications, I build all libraries for x64. This means I always have to use "vcpkg install boost:x64-windows" etc. It would be very convenient to make it possible to let the user set a default triplet that is then used when building any package.

Most helpful comment

@9prady9 you can set environment variable VCPKG_DEFAULT_TRIPLET https://vcpkg.readthedocs.io/en/latest/users/triplets/#additional-remarks

All 13 comments

If you install everything at once, you can use --triplet x64-windows to save yourself some typing.

Would an environment variable work?

Something like VCPKG_DEFAULT_TRIPLET or VCPKG_TRIPLET?

I think an environment variable would be great.

Sooner or later the need for a config file will arise. Why wait?

The Question about the individual configuration aside: Shouldn't the default be x64 anyway?

@MikeGitb The reason to use x86-windows as the default triplet is to make the new user experience as absolutely streamlined as possible: Visual Studio defaults to x86 for new projects and remembering to change the architecture is one of those tiny details that's easy to overlook even for experts.

@Kwizatz You're absolutely right, we will certainly need a config file eventually. However, I'd like to accumulate as many concrete use cases as reasonable first to make sure we can make solid design decisions (for example, should the setting be per-repository or user-wide? It's easy to say both, but I'd like to hear of the need in practice before jumping to the most complex option).

Additionally, I've heard asks offline for a triplet environment variable as well, so that's the motive for proposing it above.

Right, and imho the default in VS is wrong too ;)
But I see your point.

Having a way to atleast switch the default triplet helps, especially in docker and/or ci environments.

@9prady9 you can set environment variable VCPKG_DEFAULT_TRIPLET https://vcpkg.readthedocs.io/en/latest/users/triplets/#additional-remarks

thank you @KindDragon

@albertziegenhagel @9prady9 @Telokis

where will I set VCPKG_DEFAULT_TRIPLET or use --triplet x64-windows? would you tell me please?

One way is to set it as a windows environment variable.

@drescherjm

One way is to set it as a windows environment variable.

Thank you very much for your comment. How can I use --triplet x64-windows? it will be look like this:
./vcpkg.exe --triplet x64-windows install cgal
or in a different way

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LilyWangL picture LilyWangL  路  3Comments

tzbo picture tzbo  路  3Comments

husseinalihazime picture husseinalihazime  路  3Comments

jasjuang picture jasjuang  路  3Comments

grandprixgp picture grandprixgp  路  3Comments