-
Notifications
You must be signed in to change notification settings - Fork 428
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
Can prepend PATH in kit? #460
Comments
@KoeMai is this related to modifying the path for mingw? |
yes, i belongs to #449 |
I need this for totally separate reasons. I'm using https://github.com/bebbo/amiga-gcc to compile stuff for Amiga, but on windows it only builds on Cygwin. So I was until now using it with following build command using make: {
"label": "make",
"type": "shell",
"command": "make",
"problemMatcher": "$gcc",
"group": "build",
"options": {
"env": {
"PATH": "path/to/cygwin/bin;path/to/amiga_gcc/bin;%PATH%"
}
}
} Right now I'd like to make a transition to CMake using toolchain file. So I did: {
"name": "m68k",
"toolchainFile": "path/to/m68k.cmake"
} but it appears there are no means to set cygwin & compiler paths into PATH so that *nixy stuff isn't visible all over my OS outside working on this project. |
Looks like a separate |
I'd like this too, but as a workspace local option not just for kits. Adding the below modifies the path, but seems to prevent the kits adding the required paths (the MSVC paths aren't added if i do this) |
Don't know if this issue are fixed |
|
Leave this open. |
Refer to #596 |
I also need to prepend some directories to the path when building using CMake. Encountering thee same issue that the MSVC paths are overridden if I specify the environments from cmake tools settings. Options for prepending or appending to existing variables would certainly be helpful. The only thing I can do right now is to launch VS Code from a batch file or something that sets up an environment. This prevents me from using other VS Code features like opening workspace via right click menu in explorer. |
@pm-energid, we have a fix for the path override problem that will be included in 1.7. Also there is the possibility to run a script when setting your kit (try "environmentSetupScript" in the definition of the kit you are using). |
Hi Andreea, How should I try this newer version? I installed it, but don't see any option changes. Are the changes in behavior of how CMake environment, CMake build environment, CMake configure environment work? Also, I didn't see anything about "environmentSetupScript" in the CMake Tools documentation. I do see some references to it in certain issues though. My requirement is similar to: #1463, where I want to use binaries from custom builds (as a result of CMake configuration step). Expansion in Thanks, Update: Looks like expansion in the environment settings works now. So, I can specify my |
@pm-energid, yes we should explain environmentSetupScript. Our documentation needs some updates in general. Regarding execution of a script before any call to cmake. Does it really have to be every time before any cmake invocation (configure, build, ...etc) or once at load time is enough, as long as the environment changes are persisted throughout the entire VSCode session? environmentSetupScript is meant to keep the environment effects of running it for all the future configure/build operations during the current VSCode session. Let us know if that's not the case (it would be a bug that we'd want to fix). I am glad that trying the latest vsix confirmed that the environment settings expansion bug was fixed. So, are you completely unblocked and your scenario works or there's something else you'd like us to address? |
…s, fix mingw bugs, fixes microsoft#2880, fixes microsoft#1064, might fix microsoft#460
…s, fix mingw bugs, fixes microsoft#2880, fixes microsoft#1064, might fix microsoft#460
…s, fix mingw bugs, fixes microsoft#2880, fixes microsoft#1064, might fix microsoft#460
I have two mingw : C:\mingw32 and C:\mingw64
so not good to add both to PATH.
Add below to cmake-kits.json but not work:
The text was updated successfully, but these errors were encountered: