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
You could define multiple executables in the CMakeLists.txt for each problem.
instead of
add_executable(projecteuler ${SOURCE_FILES})
you could define
add_executable(problem1 problem1.c)
add_executable(problem2 problem2.c)
Then you get for each executable (problem1, problem2 etc.) a run configuration, which you can run independently. In this case you won't have to rewrite every time, instead you just add the new source file to a new executable.