Skip to content

Set default active workspace in workspace settings #1078

@giantmustache

Description

@giantmustache

Brief 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))
  • common
    • CMakeLists.txt (should not build, but cmake tools tries to, doesn't contain project())
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature: multirootembeddedenhancementan enhancement to the product that is either not present or an improvement to an existing feature

    Type

    No type

    Projects

    Status

    Completed

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions