Get triggers/info from CMake Tools extension in my own extension #3114
-
I'm thinking about writing an extension which will need to interact with the CMake cache (for a CMake based dependency manager we are using). Additionally I would also like to be able to figure out where the CMakeCache.txt file is (e.g. what the build directory is that is being used by this extension). I'm new to VS Code Extension development, so I'm not sure what the possibilities are for retrieving such information/triggers. Hopefully someone can point me in the right direction! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
In the meantime I became aware of the vscode-cmake-tools-api package. It seems that it should be possible to figure out what the build directory is and thus where I can find the |
Beta Was this translation helpful? Give feedback.
-
@itavero The most likely answer would be to interact with the vscode-cmake-tools-api package. To get the active project, one way would be to get the active folder using the |
Beta Was this translation helpful? Give feedback.
@itavero The most likely answer would be to interact with the vscode-cmake-tools-api package. To get the active project, one way would be to get the active folder using the
getActiveFolderPath
method and then pass that intogetProject
.