Run CMake executable targets via the cmake command
https://a4z.noexcept.dev/blog/2026/05/23/CMake-Run-Targets.htmlEvery time I use bazel for a while, and come back to CMake, I notice that I miss a cmake --run command. Bazel has a bazel run //target command.
We can not do that with cmake, but something similar.
21
Upvotes
View all comments
4
u/azswcowboy May 23 '26
Sorry, this is what ctest is for, right? Add your executable via add_test build and run ctest. What am I missing?