STM32Cube CMake Support incorrectly configures several CMake Tools settings
Hi all,
Dwelving deeper into the life and soul of the STM32Cube extensions I have come across a rather evil little bug. Luckily it is quite easy to reproduce.
- Use CubeMX to generate a boilerplate CMake project for any STM32 chip
- Open VS Code, and open the folder
- In VS Code, disable STM32Cube CMake Support extension
- In VS Code, hit "F1" and type "edit user". Select "Preferences: Open User Settings (JSON)"
- In the JSON editor, remove the "cmake.environment" key
- In VS Code, re-enable the STM32Cube CMake Support
Expected outcome:
The "cmake.environment" setting should be put into the ".vscode\settings.json" file, similar to how "cmake.cmakePath" is placed there by the extension.
Observed outcome:
The "cmake.environment" setting stays in the user's local settings file and affects all projects, ST and non-ST alike. The "${env:PATH}" evaluation is at the end of the line but nevertheless the setting gives preference to ST-sourced tools and executables if they happen to be found from from the folders that get added to the list.
