vscode-cmake-tools
vscode-cmake-tools copied to clipboard
Do not automatically build before running CTest
Brief Issue Summary
ADD_TEST() CMake function is not limited to only running binaries defined in CMake files. It can run any command we pass to it, making it coupled with CMake Tools extension a perfect duo for running all kinds of tests and checks. Apart from unit tests we can also run static analyzers and they do not require any of project's binaries to be present. Most of them just need compile_commands.json. Therefore it would be great if CMake Tools extension would not automatically start building project when running CTest. A single CMake configure is enough.
Thank you for opening this feature request. We may not get to it immediately, but would accept a PR from the community if someone would like to get an earlier start on it.
Related on Stack Overflow: CMake Tools runs build before running ctest, but I don't want it to / think it
Likely, a good solution for this would be to add a setting that controls whether we force a build before running ctest, similar to the cmake.buildBeforeRun setting.