microsoft / vscode-makefile-tools

MAKE integration in Visual Studio Code
Other
195 stars 60 forks source link

Command substitution in configuration settings? #662

Open harakka opened 1 month ago

harakka commented 1 month ago

In a project we ship .vscode/settings.json like this:

    "makefile.configurations": [
        {
            "name" : "Linux - X64 - Tiles/Sound - Release",
            "makeArgs": [
                "-j4",
                "CLANG=1",
                "CCACHE=1",
                "NATIVE=linux64", 
                "RELEASE=1", 
                "TILES=1", 
                "SOUND=1"
            ]
        },
...

I would like to be able to do this or some equivalent:

            "makeArgs": [
                "-j$(nproc)",

Is there a way to accomplish this currently without having to modify the project Makefile?

gcampbell-msft commented 1 month ago

@harakka No, not currently. As of now, we don't implement any macro expansion that supports nproc when we parse the user defined makefile configuration.

If you're interested, please let us know and we can mark this as a feature request and we can let the community upvote it to indicate interest. Thanks!

harakka commented 1 month ago

Yes, I would be interested to see this as a feature.