I am currently doing some Project Euler challenges in C using the JetBrains CLion IDE. When I completed these in Python and Java (in PyCharm and IntelliJ, respectively), I w
Even I was facing the same problem, it's a tiring job to edit CMake file and add executable every time. So I found a solution to this,
There is a plugin which does it seamlessly for you.
Just add this plugin to your CLion and whichever file you want to make is executable right click and add it as Executable,
It will automatically edit your CMake file.
Link:
https://plugins.jetbrains.com/plugin/8352-c-c--single-file-execution