CMake CTest output to JUnit XML

Is there a way to report the results in a junit xml format with CTest? I have found the the --output-junit comandline switch but running ctest --output-junit testRes.xml doas not create output file...


Solution 1:

ctest --output-junit testRes.xml doas not create output file...

This is relatively new feature, You just need to update Your CMake / CTest to v.3.21.4 or higher (ref. https://cmake.org/cmake/help/v3.21/manual/ctest.1.html)