Closed dpelle closed 1 year ago
Hi! I see an issue here: what if you have multiple test executables?
In your case, you can just add this to your vimrc something like this:
let g:gtest#gtest_command = "/usr/local/bin/test-from-compile-commands"
and implement /usr/local/bin/test-from-compile-commands
to find the executable found in the compile_commands.json
and run it.
I'm closing this issue because this can be achieved implementing an external executable, as described above.
If you have a simple working implementation, feel free to add it here as a comment, so I can add an example to the documentation. Or request a PR, as you prefer.
It is a tad annoying to have to pass the text executable in the following command, especially when a project has multiple executable names:
Could the executable name be guessed from the info in the
compile_commands.json
file, which is typically automatically generated when e.g. using cmake and building withexport CMAKE_EXPORT_COMPILE_COMMANDS=ON
?