Adapting a Windows .bat script with @call vcvars64.bat #1484
Replies: 3 comments 6 replies
-
This has come up a few times before, in different contexts, and I've never been able to figure out how to support this pattern well. Just runs every line of every recipe in a fresh shell, so environment variables aren't persisted across invocations. |
Beta Was this translation helpful? Give feedback.
-
The workaround I've proposed to our team is to move the
|
Beta Was this translation helpful? Give feedback.
-
Couldn't you shebang the invocation? Just does some shebang magic on Windows for PowerShell shebang scripting. Is that also true for CMD @casey? |
Beta Was this translation helpful? Give feedback.
-
I'm interested in using just as an alternative to a Windows .bat script.
The first step of the script is to call a vendor-provided script that sets various environment variables:
My understanding is that this step is necessary for the subsequent cmake invocations to detect and use the appropriate C/C++ toolchain. The rest converts to a cross-platform set of just recipes:
But it's not at all clear how I can use the environment variables via vcvars64.bat using just.
Edit: I'm expecting to use cmd.exe for windows-shell, but would be happy to have a powershell solution.
Thanks in advance for any suggestions.
Beta Was this translation helpful? Give feedback.
All reactions