When you want to build and run single c/cpp file in CLion,
needs to be configured to declare
. It is troublesome when you want to run many of the files independently within the same project.
This plugin supports to insert
, so that you can easily build and run a single file. Also, you can specify a location of directory for build executable file for each target.
Recent change notes
version 1.3: Bug fix for config. - Settings was not saved persistently
- Add set_target_properties() configuration for target specific runtime output directory setting.
- Bug fix: handle directory name including whitespace
version 1.1: Bug fix.
General usage instructions
1. Open source file (.c/.cpp) which you want to execute in editor.
2. Right click on editor and choose "Add executable for single c/cpp file".
That's all! Plugin automatically insert add_executable() code in CMakeLists.txt
3. You can build and run this source file from top-right icon or from menu bar.