Is it possible to choose default cmake preset configuration from the vscode devcontainer

400 Views Asked by At

I have two devcontainers defined for my c++ project, one for gcc and one for clang, each based on a different container source.

enter image description here

The clang container is defined so

// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
{
    "name": "mw-clang",
    "image": "dockerhub.moduleworks.com:443/devops/docker-images/linux-clang-toolkit",


    // Configure tool-specific properties.
    // "customizations": {},
    "customizations": {
        "vscode": {"extensions": ["ms-vscode.cmake-tools"]}
    }


}

However I have two different cmake presets, again one for gcc and one for clang. I've figured out how to tell vscode that I need cmake tools for each container.

enter image description here

Is it also possible in each dev container to specific the CMakePreset which is most suitable for that container and also add other custom CMake flags?

0

There are 0 best solutions below