Test preset whose configure preset doesn't have a binary dir searches current directory
CMakePresets.json
:
{
"version": 5,
"configurePresets": [
{
"name": "default"
}
],
"testPresets": [
{
"name": "default-test",
"configurePreset": "default"
}
]
}
If you run ctest --preset default-test
from the current directory, it will try to run tests in the current directory, because it appends the empty binaryDir
to the source directory. Because CMake builds are typically out-of-tree, this is probably not what we want by default.