Open SpaceIm opened 3 years ago
Thank you for the feature idea. We can't guarantee we will get to this soon, but if someone wants to look into this, we will accept a PR.
This issue is now marked as 'stale-old' due to there being no activity on it for the past 720 days. Unless the 'stale-old' label is removed or the issue is commented on, this will be remain open for at least 14 days and then it may be closed. If you would like to make this issue exempt from getting stale, please add the 'stale-exempt' label.
This would be very helpful for me too. I even have my projects get the CMake exe from Conan.
Brief Issue Summary
Add an
envFile
property insettings.json
to supportdotenv
files. This way we could inject env variables programmatically generated in adotenv
file by an upstream process. C/C++ extension provides this property for debugger configuration inlaunch.json
.Rational
It would be very useful when using
conan
for example. Indeed it is able to create adotenv
file settingPATH
,LD_LIBRARY_PATH
andDYLD_LIBRARY_PATH
to build tools runtimes. For example let's say I want to compile SPIRV shaders through CMake:glslang
orshaderc
) through conan, but it can work with CMake only if these executables are inPATH
, and their shared libs dependencies inPATH
(on Windows),LD_LIBRARY_PATH
(Linux) orDYLD_LIBRARY_PATH
(Macos).Manual setting of env variables in current CMake Tools is not generic enough, conan paths are very specific to each dependency and complex (different for each version, os, arch, compiler).
environmentSetupScript
works but it's quite static and tied to kits (and I think that this property should not be in kits but settings, or there should be a way to add this in settings also). It means that you have to reload the kit after a modification of the script. It's not very intuitive. And it doesn't seem to work on Windows with.bat
(https://github.com/microsoft/vscode-cmake-tools/issues/1463).