clion tries to run cmake_device_link.o when enable_language(cuda) is used

Completed

Everything works in command line. But clion tries to run cmake_device_link.o after building instead of my project executable if I set one of the source file as cuda file

set_source_files_properties(src/kernel.cpp PROPERTIES LANGUAGE CUDA)
0
2 comments
Please go to the issue tracker of CLion and vote for the issue, so that they fix it : youtrack.jetbrains.com/issue/CPP-10292. For now, you can manually add a configuration using the same target and manually setting the executable (select other...) 
0

I've created the plugin CLion CUDA Run Patcher that temporarily fixes this issue until JetBrains makes a real fix. It is compatible with CLion >= 2018.1. Simply install the plugin and the correct executable should run/debug correctly (provided you aren't using OUTPUT_NAME CMake target property).

0

Please sign in to leave a comment.