我想Clion使用使用外部 makefile 创建的可执行文件进行调试。
我看到我可以选择另一个可执行文件,Run/Debug Configurations --> Executable但它会自动运行 my CMakeLists,我不想这样做(因为它失败了)。
我知道Clion目前不支持“使用现有 makefile 导入项目”。
有没有办法做到这一点?
Cmake's add_custom_command(),add_custom_target()我打电话给我的makefileClion Run/Debug Configuration --> Executable我从我的makefile中选择了编译的可执行文件。--- 编辑 ---
1. 示例
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)