I want to debug with Clion
an executable that was created using outer makefile.
I saw I can choose another executable in Run/Debug Configurations --> Executable
but it automatically runs my CMakeLists
, which I don't want to (cause it fails).
I know Clion
currently doesn't support "import project with existing makefile".
Is there a way to do that?
Cmake
's add_custom_command()
and add_custom_target()
I called my makefile
Clion
Run/Debug Configuration --> Executable
I chose the compiled executable from my makefile.--- Edit ---
1. Example
add_custom_command(OUTPUT app_run.txt
COMMAND /bin/echo "Not building!"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
add_custom_target(app_run ALL
DEPENDS app_run.txt)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With