-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
add cmakeToolchain to CMakeSettings.json #2102
Conversation
It is a bit strange as it should already use the default vcpkg one |
@miscco |
I build it just last wek with the new toolchain |
I got it. Without the changes it uses system vcpkg: ( I think stl vcpkg is desired... |
So, IIUC, the question here is whether we want to override the user's choice of default vcpkg instance (which IIUC the user chose via |
yes |
if we decide that it is not worth overriding the user's choice of default vcpkg then we need to update the instruction: https://github.com/microsoft/STL#how-to-build-with-the-visual-studio-ide |
how is the "system" vcpkg defined? do you set it or does VS2022 set it? |
sidenote: I have a branch that removes CmakeSettings.json and adds CMakePresets.json (which is a similar feature provided natively by cmake), however I haven't opened a PR because it's somewhat broken at the moment in vscode. |
@barcharcraz I installed it myself a couple days ago. |
I am far from an expert here, but using our internal vcpkg by default sounds like the right thing to do. Not only does it keep the repo in a self-contained known state, but we generally require the latest version of Boost, which a global install of vcpkg might not have. That said, my intuition for how vcpkg should be used may not reflect most vcpkg users, especially IDE users. |
by default yes, but if I understand correctly fsb4000 has set an environment variable designed to override such a default.... I think the actual solution here might be to switch to vcpkg manifest mode |
Not intentionally :) I just did again (from new place for test):
and it will use the place by default.
|
I think we should either (or both)
that said I don't have a huge problem with this PR, if we're all OK with overriding the vcpkg instance that the user requested by running integrate install. |
f6696ce
to
c6ce483
Compare
It works both console and IDE. But now dependencies located there: When I switch between branches I usually delete the out folder(Maybe now I should delete without "vcpkg_installed" folder...) |
I am not sure about Azure Pipeline. STL/azure-devops/vcpkg-dependencies.yml Lines 21 to 38 in a9321cf
|
Line 563 in a9321cf
|
now: https://dev.azure.com/vclibs/09a07da7-73b5-4bba-8263-2aad1a16c33d/_apis/build/builds/8709/logs/81 it is definitely does not use vcpkg Caching. +1 minute 30 seconds for every Build :( |
I think you need to update the cache hash for vcpkg. STL/azure-devops/vcpkg-dependencies.yml Lines 17 to 20 in 721e3ad
The cache hit loads a deprecated version of the vcpkg install directory. Further, the cache hit prevents the pipeline from uploading a new version of the cache. You may want to hash the vcpkg manifest into the hash of the vpkg cache key, see documentation. key: '"${{ parameters.targetPlatform }}" | "$(${{ parameters.vcpkgSHAVar }})" | ${{ hashFiles('vcpkg.json') }} | "2020-03-01.01"' Or just update the date. |
599b720
to
c6ce483
Compare
after #2151 my change is not needed. |
Today I tried to build STL from Visual Studio 2022 IDE (first try, before only command line)
And I had to add cmakeToolchain or I got an error: "BOOST NOT FOUND".
So I decided to contribute my changes.