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
My goal is for a port to include an environment variable (LIBTORCH_ROOT) in the ABI on linux. This contains the path to a libtorch install (through a conda virtual environment). This virtual environment variable could change (if the user is in a different virtual env), and cmake configuration errors could occur.
Suppose I have a library libA, which resides in a custom registry, and a downstream repo uses libA as a dependency through the custom registry.
In the downstream project, I can use a custom triplet which has the following: set(VCPKG_ENV_PASSTHROUGH "LIBTORCH_ROOT"). This puts the environment variable LIBTORCH_ROOT into the ABI (I confirmed this by inspecting vcpkg_abi_info.txt), and when I switch virtual environments with a different path for LIBTORCH_ROOT, it rebuild and doesn't reuse any cached artifacts.
Is there a way to set this in my port directly, which doesn't depend on downstream projects setting the VCPKG_ENV_PASSTHROUGH in the triplet? I've read that for Windows at least, I can use a environment-overrides.cmake inside the port of the custom registry, but I haven't gotten this to work on linux. I'm not sure if this feature is not supported, or if it is and I have something else configured wrong which is causing this to not work for me.
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
Uh oh!
There was an error while loading. Please reload this page.
-
My goal is for a port to include an environment variable (
LIBTORCH_ROOT) in the ABI on linux. This contains the path to a libtorch install (through a conda virtual environment). This virtual environment variable could change (if the user is in a different virtual env), and cmake configuration errors could occur.Suppose I have a library libA, which resides in a custom registry, and a downstream repo uses libA as a dependency through the custom registry.
In the downstream project, I can use a custom triplet which has the following:
set(VCPKG_ENV_PASSTHROUGH "LIBTORCH_ROOT"). This puts the environment variableLIBTORCH_ROOTinto the ABI (I confirmed this by inspectingvcpkg_abi_info.txt), and when I switch virtual environments with a different path forLIBTORCH_ROOT, it rebuild and doesn't reuse any cached artifacts.Is there a way to set this in my port directly, which doesn't depend on downstream projects setting the
VCPKG_ENV_PASSTHROUGHin the triplet? I've read that for Windows at least, I can use aenvironment-overrides.cmakeinside the port of the custom registry, but I haven't gotten this to work on linux. I'm not sure if this feature is not supported, or if it is and I have something else configured wrong which is causing this to not work for me.Beta Was this translation helpful? Give feedback.
All reactions