Closed oursland closed 1 week ago
@oursland I'm very sorry that I can't reproduce the problem you mentioned, I uninstalled cmake installed on my machine and running cmake: configure command gives me an error, when I reinstalled cmake without restarting vscode and ran cmake: configure command directly the cmake project can be configured successfully, can you give me some suggestions?
Repro steps:
Hi @v-frankwang:
The steps to reproduce this issue may be observed in the following video:
https://github.com/microsoft/vscode-cmake-tools/assets/622450/8be96fc0-b75c-4b09-9efd-aed8bb5d4f24
This is performed when using the FreeCAD repository with VSCode.
git clone https://github.com/FreeCAD/FreeCAD.git
contrib/.vscode/
directory to the repo root directory: cp -a contrib/.vscode/ .
CMakePresets.json
define the location of the cmake
executable as conda/cmake.sh
, which specifies the cmake
binary within the to-be-installed conda environment. An error will be presented because this environment does not exist.conda/setup-environment.sh
to install the packages, including cmake
.Conda Debug
or Conda Release
.CMake: Configure
.cmake
binary.
Brief Issue Summary
In environments where the
cmake
path points to a file that does not yet exist, installingcmake
does not correct the issue requiring restaring VS Code to proceed.An example is in projects where build dependencies are maintained through a local package manager such as
conda
. When the project is loaded, the path tocmake
for the project is invalid. After installing the build dependencies, thevscode-cmake-tools
extension does not attempt to use the newly installedcmake
.What is expected is that when attempting to use
cmake
an error due to the absence of thecmake
executable should present a UI, and when thecmake
executable is installed it should use this. The current implementation performs this check once, presumably to prevent multiple UI notifications of thecmake
path error.It would be preferable to try to run the
cmake
program each time to account for the possibility of the program being installed, and upon failure only present the error notification UI on the first failure.CMake Tools Diagnostics
No response
Debug Log
No response
Additional Information
No response