I am trying to use the outputJUnitFile in CMakePresets.json, an option which was introduced in CMakePresets version 6 (CMake >= 3.25), and with the video I found (referenced below) it seemingly should have been supported starting with VS 17.7, but I have VS 17.12.3 and the CMakePresets max supported version is still 5.
I can’t find anything about the progression of CMakePresets support in VS2022, other than the Microsoft Learn documentation here which hasn’t been updated since June 9th of 2023, and this video from the Pure Virtual C++ conference from April 24th of 2024.
Does anyone know if this is supported and I am missing something, or if this is something else like it was pushed to VS 2024 (or whatever the next version will be)?
I tried to do the following in my CMakePresets.json:
"testPresets": [
{
"name": "vs-test",
"configurePreset": "vs-with-test",
"output": {
"shortProgress": true,
"verbosity": "verbose",
"outputOnFailure": true,
"outputJUnitFile": "${sourceDir}/out/test/vs-test/results.xml"
},
"execution": {
"noTestsAction": "error",
"stopOnFailure": false
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "vs-nost-test",
"configurePreset": "vs-nost-with-test",
"inherits": "vs-test",
"output": {
"outputJUnitFile": "${sourceDir}/out/test/vs-nost-test/results.xml"
}
},
{
"name": "vs64-test",
"configurePreset": "vs64-with-test",
"inherits": "vs-test",
"output": {
"outputJUnitFile": "${sourceDir}/out/test/vs64-test/results.xml"
}
},
{
"name": "vs64-nost-test",
"configurePreset": "vs64-nost-with-test",
"inherits": "vs-nost-test",
"output": {
"outputJUnitFile": "${sourceDir}/out/test/vs64-nost-test/results.xml"
}
}
]
This results in the following errors in the Visual Studio 2022 Error List and causes VS to fall back to a default configuration.