8

I have a project that uses git-repo so it contains multiple repos. The only way I can find of supporting this in VSCode is to use multi-root workspaces and add each repo as a separate folder within the workspace. Some of these repos use CMake but some don't. I find that when I open the workspace I get messages for these repos like:

CMakeLists.txt was not found in the root of the folder 'MyFolder'

then VSCode attempts to setup CMake by creating a Build directory containing a bunch of default files. I also get:

CMake Tools would like to configure IntelliSense for the 'MyFolder' folder.

Is there any way to tell CMake to ignore a folder, maybe a setting in the .code-workspace file?

parsley72
  • 8,449
  • 8
  • 65
  • 98
  • 2
    Not the answer to your question, but [this issue](https://github.com/microsoft/vscode-cmake-tools/issues/1069) (still open as of this comment) may be related. For those who said yes to _allow CMake to configure IntelliSense_ and want to undo it, just remove the `configurationProvider` key in `.vscode/c_cpp_properties.json`. – deqyra Dec 15 '20 at 08:30
  • did not work for me – Szpaqn Nov 05 '21 at 07:26

1 Answers1

1

I guess you installed Cmake Tools extension in VScode, it will automatically run when a folder is opened. To avoid run cmake on specific folder, you can try create .vscode/settings.json on your folder. And set "cmake.configureOnOpen": false