How to create and configure run.json in the new JetBrains Fleet for C++?

4.9k views Asked by At

I was trying how to create I / O for the new JetBrains' IDE called Fleet. But unfortunately couldn't do so. So, here I am asking the StackOverflow community "How can I configure the run.json file in Fleet".

What am I supposed to write in that file?

I am trying to code C++ file in Fleet.

1

There are 1 answers

0
Ruslan Kossak On

This is what I came up with:

{
    "configurations": [
        {
            "type": "command",
            "name": "run",
            "dependsOn": ["build"],
            "program": "$PROJECT_DIR$/solution",
        },
        {
            "type": "command",
            "name": "build",
            "program": "/usr/bin/g++",
            "args": ["$PROJECT_DIR$/main.cpp", "-std=c++17", "-pthread", "-O2", "-o", "solution"],

        },
    ]
}

It's called chained run configuration. You need separate build and run configs, and make the run config depend on the build config. Hope that helps :)