-
Notifications
You must be signed in to change notification settings - Fork 468
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
Passing environment variable to "cmake" tasks #2553
Comments
You can define an active
The Cmake Install Task will pick the settings from the active |
One option that can be added to the {
"type": "cmake",
"label": "CMake: build",
"command": "build",
"targets": [
"all"
],
**"preset": "presetName",**
"group": "build",
"problemMatcher": [],
"detail": "CMake template build task"
} |
Hi! The DESTDIR=/package/stage cmake --install . With the Do you plan to add a way to set environment variables directly in CMake tasks ? |
install
command in task
Thank you for your clarification.
Currently, as a workaround, you can add the environment variables in your default build preset. I will use this issue to track adding environment variables to the cmake tasks. |
Thank you ! |
There is an upcoming fix for this issue in PR #2636 |
Brief Issue Summary
Is it possible to pass environment variable to cmake tasks ?
I'm currently using the pre-release version of the extension, and want to use cmake tasks to install the binaries to predefined directories using DESTDIR. For example, "shell" tasks provide the "env" keyword in "options", but for "cmake" tasks, only the "cwd" is available.
Thanks!
CMake Tools Diagnostics
No response
Debug Log
No response
Additional Information
CMakeTools version :
1.11.19
VSCode verson:
1.67.0
OS: Ubuntu 21.04 TLS
The text was updated successfully, but these errors were encountered: