We provide an API in order to get information from the CMake Tools extension from other VS Code extension.
NPM: https://www.npmjs.com/package/vscode-cmake-tools?activeTab=readme GitHub: https://github.com/microsoft/vscode-cmake-tools-api
We have created a simple sample extension that showcases how simple it is to interact with this API. You can find it in the GitHub for the CMake Tools API here: https://github.com/microsoft/vscode-cmake-tools-api/tree/main/sample-extension