Reputation: 33769
I have a CMake project in CLion. I am able to build my executable hello
.
Now I want to run it inside CLion with a custom runner mpirun
(it is an MPI project).
Bash command should look like: mpirun -n 5 path_to_hello_executabe/hello
How can I obtain this path_to_hello_executabe
inside CLion configuration?
In CMake it looks like add_custom_target(run $ENV{MPIRUN} -n 5 $<TARGET_FILE:hello>)
, so what I need is an equivalent for $<TARGET_FILE:hello>
.
Upvotes: 0
Views: 376
Reputation: 1937
Upvotes: 1
Reputation: 1937
That's not possible for now in CLion, since CLion's configurations can't run a command from add_custom_target cmake command. However this looks like an interesting use case and a nice feature to have: https://youtrack.jetbrains.com/issue/CPP-5831
Upvotes: 0