Set default active workspace in workspace settings
See original GitHub issueBrief Issue Summary
I have a workspace file that contains 3 folders, only one of them is a cmake project the second one is a cmake folder that gets included as external. autoSelectActiveFolder
doesn’t help me here since it might be that I don’t have any file open at the moment that I open vs code and press the build button.
- main_project
- CMakeLists.txt (includes
add_subdirectory(../common EXTERNAL_COMMON)
)
- CMakeLists.txt (includes
- common
- CMakeLists.txt (should not build, but cmake tools tries to, doesn’t contain
project()
)
- CMakeLists.txt (should not build, but cmake tools tries to, doesn’t contain
- other_project (not cmake, but cmake tools still asks which kit I want to use)
Expected:
I would like to see that I can set the default active folder in my project, so that I know that pressing build will actually build the default project.
Apparent Behavior:
Depending on what cmake tools chooses, it might be that I get an error, because it cannot find a CMakeLists.txt
or it find one in another folder, which is actually an external folder and therefore it is not a root CMakeLists.txt
. You get an error that it cannot find project()
for example. I just don’t want this project to build at all.
Platform and Versions
- Operating System: Windows 10
- CMake Version: 3.16.0
- VSCode Version: 1.42.1
- CMake Tools Extension Version: 1.3.0
- Compiler/Toolchain: QNX custom toolchain
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
That’s fair. I’ll change this into a feature request. I don’t think we’d want to add a setting for the current active folder, but rather the default active folder when no other folder is set as active.
Using multi root project should not mean, that all folders automatically contains standalone top level projects.
CMakeLists.txt
in these folders can be included usingadd(...)
directive from “main” project folderCMakeLists.txt
and are not means to be configured as self-contained.There should be option to exclude configuration of that folders.