Skip to content

Request: Single global C_Cpp_properties.json file for a multi-root workspace (not one per workspace folder) #2060

Open
@dsanz006

Description

@dsanz006

For my current project, I am using a multi-root workspace. My problem is that the C/C++ Extension doesn't allow me to have a single global C_Cpp_properties.json file for the entire workspace: it forces me to create a different properties file for each folder. My workspace folder structure is something like this:

<workspace root>/src/
<workspace root>/lib1/
<workspace root>/lib2/
<workspace root>/vscode_workspace/

where vscode_workspace/ doesn't contain any code: it only contains myWorkspace.code-workspace and .vscode/C_Cpp_properties.json. The myWorkspace.code-workspace file looks something like this:

{
"folders": [
{ "path": "../src" },
{ "path": "../lib1" },
{ "path": "../lib2" },
]
}

However, my C_Cpp_properties.json file is not detected correctly, the extension wants me to have a properties file on each src/ lib1/ and lib2/ folders.

I know that with the latest update I can define some parameters of the C_Cpp_properties.json file in the .code-workspace file under the "settings" field, but this is not valid for my case as I have different configurations that require different includePaths and defines.

Actually, the ideal solution for what I want to do would be that different configurations are supported in the .code-workspace file, whithout a need for the C_Cpp_properties.json file at all.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions