Presets: Using preset with path argument to cmake doesn't work as expected
Minimal CMakeUserPresets.json
to reproduce the problem:
{
"version": 1,
"cmakeMinimumRequired": {
"major": 3,
"minor": 19,
"patch": 0
},
"configurePresets": [
{
"name": "Base",
"hidden": true,
"binaryDir": "build"
},
{
"name": "Debug",
"inherits": "Base",
"generator": "Ninja"
}
]
}
Run cmake from the source directory like so:
cmake --preset=Debug .
Expected behavior: The build directory will be in build
below the source directory.
Actual behavior: The source directory is used as the build directory. In other words, the binaryDir
field is ignored instead of being inherited from the Base
preset`.
Edited by Kyle Edwards