vscode-cmake-tools
vscode-cmake-tools copied to clipboard
Automatically configure when switching kits
When switching kits, it's necessary to also run Configure to configure with the kit. Perhaps switching kits should automatically trigger configuration? Or, short of that, perhaps add a setting to enable configuration when switching kits. There is an existing setting to auto configure on open. These could be merged, so CMake is always maintained in a configured state. Though, even when not (re-)configuring on open, it would seem beneficial to always configure when switching kits.
Just as a side note: In VS2019 configurations can be defined in CMakeSettings.json and when switching between them, the configuration happens in a new directory. When switching kits with the VSCode extension - the configuration is done in the same location. This needs to be taken into consideration too.
@Zingam The configuration will be done in different locations if you make use of variables in the cmake.buildDirectory
.
if it is going to be added then it should be customizable. I often change kits and sometimes by accident and don't want to trigger a configure always
@bobbrow Thank you for reminding me about these variables. Should we have predefined configurations/environments VS2019 style in the VSCode extension? https://docs.microsoft.com/en-us/cpp/build/cmake-predefined-configuration-reference?view=vs-2019
@Zingam can you create a new feature request for that? Thanks!
I use different build directories for different kits, and automatic configuration will harm my usage. So this should probably be at least optional/configurable. Maybe it's possible for vscode-cmake-tools to detect, whether actual value of buildDirectory
(after variables substitution) has been changed due to switching kits, and re-configure depending on this.
Any news on this?