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)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.