buildPresets jobs does not seem to work
All,
I'm fiddling around with CMake presets and I tried this .json (stripped down for clarity):
{
"version": 2,
"cmakeMinimumRequired": {
"major": 3,
"minor": 20,
"patch": 3
},
"configurePresets": [
{
"name": "Release",
"displayName": "Release Config",
"description": "Release build using GNU Make generator",
"generator": "Unix Makefiles",
"binaryDir": "${sourceDir}/build-Release",
"cacheVariables": {
"BASEDIR": "$env{BASEDIR}/Darwin",
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/install-Release"
}
}
],
"buildPresets": [
{
"name": "Release",
"configurePreset": "Release",
"jobs": 4,
"targets": ["install"]
}
]
}
@kyle.edwards helped me out with the targets
bit (see #22272 (closed)) which made the json valid. I then added the "jobs": 4
bit in hopes that if I do this:
cmake --preset=Release
cmake --build --preset=Release
the last line would be equivalent to:
cmake --build --preset=Release -j 4
But that doesn't seem to be the case. I seem to be only getting make -j1
level of parallelism.
Now if I explicitly add -j 4
(i.e., that last command) then I do get make -j4
like behavior.