Open bobbrow opened 4 years ago
We do want the extension to warn users for the cases when they are not configured correctly, but I think we could potentially add a "Ignore this folder" button so that you are not repeatedly warned for the same non-CMake folder.
The trouble lies with the extension being activated on a folder that it would not normally activate on (since there's no CMakeLists.txt anywhere). The extension assumes that if it is activated it's because there should be a CMakeLists.txt *somewhere*. With multi-root this is not always the case.
I would like to add to this that even a CMakeLists.txt file might not be an actual project. We have a common folder with a CMakeLists.txt and it is used in multiple projects to build with different compilers. I don't want it to build on itself.
Also, a button is not always an option, I would rather see settings in my workspace file.
That's a valid point. If we do add a button we should store the state in a setting.
Hi @bobbrow, I'm also interested in this (about @giantmustache proposal in particular). Any news?
I also wanted to add that this:
We do want the extension to warn users for the cases when they are not configured correctly, but I think we could potentially add a "Ignore this folder" button so that you are not repeatedly warned for the same non-CMake folder.
seems not true for me.
I have a multi-root workspace with two folders:
The problem is that CMake Tools runs twice, resulting in two outputs: one good configuration/output build folder, and one bad.
Is there some workaround to avoid generating the bad one? (As you say, it should just warning of unexisting CMakeLists.txt file instead of configuring something not existing...). How is that possible?
Thank you.
UPDATE: the above behavior seems related to the "cmake.sourceDirectory": "${workspaceFolder:myFolder1}"
setting I had into my project.code-workspace
file. Is this expected @bobbrow ?
Anyway, it seems solved by removing the above settings, since CMake Tools automatically recognizes which folder should be configured.
Now I reproduce the same issue reported in this thread.
I have Swift and Rust projects with a workspace file and without one. Whenever I open the project I get a complaint by CMakeTools about missing CMakeLists.txt. My setup is: a root directory with just README.md and .vscode and the projects are in subdirectories.
I think this message shouldn't pop up by default.
Related to #3646 and the ideas we've discussed there.
I have a multi-root workspace, where one of the roots is for Python code, one is for CMake, and one is just for a reference to common headers that are not under the CMake root. I use the 1.3.0-beta of CMake Tools and it works fine. It would be even better if CMake Tools did not complain or otherwise react on roots that don't have CMakeLists.txt file.
Originally posted by @astraujums in https://github.com/microsoft/vscode-cmake-tools/issues/271#issuecomment-581034133