vscode-cmake-tools
vscode-cmake-tools copied to clipboard
CMake Tools not populating environment variables with Legacy Driver
I was able to reproduce and fix the issue. It was a silly mistake with a hole in the TS type-checker. I found that the issue only occurs when using non-cmake-server mode. The legacy driver wasn't receiving the environment variables from configuration.
The issue you're seeing when you enable CMake Server is another issue. If I were you, I'd do some investigation and maybe open another issue for it.
Originally posted by @vector-of-bool in https://github.com/microsoft/vscode-cmake-tools/issues/384#issuecomment-383352180
Can you share an example where this isn't working for you? The code is essentially the same after that fix. We have validated that the cmake.environment is being used for the legacy driver.
I have found that the source of problem actually is that when CMake-Tools Kit has <LANG>COMPILER defined, then it sets CMAKE<LANG>_COMPILER_ARG1 differently. But when the Kit has <LANG>COMPILER undefined (empty string), then CMAKE<LANG>_COMPILER_ARG1 is set as $ENV{CC}.
Thus, cmake configuration works when the Kit does not define compiler. Isn't it a bit rare?
This issue is now marked as 'stale' due to there being no activity on it for the past 30 days and being labelled 'more info needed'. Unless the 'stale' label is removed or the issue is commented on, this will be closed in 7 days. If you would like to make this issue exempt from getting stale, please remove the 'more info needed' and 'stale' labels or add the 'stale-exempt' label
This issue is now closed due to there being no activity on it for the past 7 days since being marked as 'stale'.