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

Change default triplet #53

Closed
albertziegenhagel opened this issue Sep 21, 2016 · 14 comments · Fixed by #70
Closed

Change default triplet #53

albertziegenhagel opened this issue Sep 21, 2016 · 14 comments · Fixed by #70

Comments

@albertziegenhagel
Copy link
Contributor

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.

@Telokis
Copy link
Contributor

Telokis commented Sep 21, 2016

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

@ras0219-msft
Copy link
Contributor

Would an environment variable work?

Something like VCPKG_DEFAULT_TRIPLET or VCPKG_TRIPLET?

@albertziegenhagel
Copy link
Contributor Author

I think an environment variable would be great.

@Kwizatz
Copy link
Contributor

Kwizatz commented Sep 22, 2016

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

@MikeGitb
Copy link
Contributor

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

@ras0219-msft
Copy link
Contributor

@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.

@MikeGitb
Copy link
Contributor

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

@9prady9
Copy link
Contributor

9prady9 commented May 17, 2018

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

@KindDragon
Copy link
Contributor

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

@9prady9
Copy link
Contributor

9prady9 commented May 17, 2018

thank you @KindDragon

@K-M-Ibrahim-Khalilullah
Copy link

@albertziegenhagel @9prady9 @Telokis

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

@drescherjm
Copy link

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

@K-M-Ibrahim-Khalilullah
Copy link

K-M-Ibrahim-Khalilullah commented Apr 7, 2020

@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

strega-nil pushed a commit to strega-nil/vcpkg that referenced this issue May 5, 2021
strega-nil added a commit to strega-nil/vcpkg that referenced this issue May 5, 2021
The following PRs are included:

* hopefully fix crash in constraints (microsoft#60)
* [vcpkg] allow --version to check the version (microsoft#50)
* Remove baseline warning (microsoft#27)
* [git] always pass autocrlf=false (microsoft#58)
* ignore QtCreator CMake project files (microsoft#54)
* ignore .DS_store files (microsoft#53)
* [vcpkg] x-add-version now also checks if the manifest file is properly formatted (microsoft#43)
* hopefully fix ci issue microsoft#16773 (microsoft#34)
* Add docs to set VCPKG_ROOT to run tests (microsoft#45)
* [vcpkg] x-add-version improve speed by calling get_builtin_baseline only once (microsoft#44)
* add clang-format version to format-cxxcode (microsoft#41)
* [vcpkg] Introduce experimental workaround X_VCPKG_NUGET_ID_PREFIX (microsoft#40)
* [supports] Add `native` identifier expression and x-check-support command (microsoft#29)
* [metrics] Split reporting of installs into name:triplet (microsoft#39)
* [vcpkg] Improve error when accessing missing feature (microsoft#38)
* [vcpkg] Allow shallow git registries (microsoft#37)
* Disable git autocrlf when archiving tree (microsoft#36)
* Use only named packages from extra registries (microsoft#35)
* [registries] add metrics (microsoft#30)
* Add vcpkg policy cmake helper port support (microsoft#17)
* [osx] add support for rosetta (microsoft#23)
* don't build tls12-download unless it's needed (microsoft#33)
* Add new telemetry points for versioning (microsoft#21)
* add cmake_minimum_required to vcpkg_tags (microsoft#25)
* [x-add-versions] Perform atomic replacement of versioning files (microsoft#28)
* [tools] support gsutil (microsoft#19)
* add CUDA 11.1 and 11.2 to KEEP_ENV_VARS defaults (microsoft#26)
* Add finite timeout on CURL metrics endpoint. (microsoft#22)
* fix UB in make_error_code(utf8_errc) (microsoft#18)
@Timmmm
Copy link

Timmmm commented Jul 24, 2021

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

Not on my system. At least, not with CMake:

PS C:\Users\Tim\Realsense\realsense_recorder> cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=C:/Users/Tim/local/vcpkg/scripts/buildsystems/vcpkg.cmake
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
-- The CXX compiler identification is MSVC 19.28.29913.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features - done
CMake Error at C:/Users/Tim/local/vcpkg/scripts/buildsystems/vcpkg.cmake:794 (_find_package):
  Could not find a package configuration file provided by "realsense2" with
  any of the following names:

    realsense2Config.cmake
    realsense2-config.cmake

Has that changed?

dempo93 pushed a commit to dempo93/vcpkg that referenced this issue Aug 23, 2022
dempo93 pushed a commit to dempo93/vcpkg that referenced this issue Aug 23, 2022
fwcd pushed a commit to fwcd/vcpkg that referenced this issue Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants