How do I build without re-configuring with cmake tools in vs code?

76 views Asked by At

Question

Question in the title.

Context:

My project has recently moved to linux and VS Code as apposed to Windows and Visual Studio.

I have successfully set up my cmake tools plugin and am able to configure, build and run the debugger. However, I have encountered one small nuisance. When I press the build button, it will re-configure before building even if I have made no changes to my CMakeLists.txt.

We have an in house tool which does our configuration for us. I have no idea how it works, except that it is a wrapper around cmake. Usually, the configuration results from using the wrapper vs using cmake directly are compatible, but not always. So I'd like to configure with our tool, but build with the cmake tools plugin. Also, it saves time not to configure twice...

My Efforts:

I've been presented with this tool bar:

enter image description here

From pouring over the CMake docs, I've determined that there is a CMakePresets.json which contains this p_debug build preset which is associated with the make-Debug configure preset. This makes sense to me from a high level... but I see no option to specify that I don't need to re-configure every time I press the build button.

Further, I have no idea what [[Targets In Preset]] means... I've looked at the p_debug preset in the CMakePresets.json file. Ther are no "targets" listed... so I don't know if there is something there that I'm missing? This is the entirety of what is contained in the build preset:

"buildPresets": [
        {
            "name": "p_debug",
            "configurePreset": "make-Debug",
            "jobs": 40
        },
]

Anyway, I'm definitely a little lost and in the weeds trying to figure out how to accomplish this seemingly basic task. Help is appreciated.

0

There are 0 answers