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 was always able to create a single project named "ProjectEuler" and add any number of source files that I could execute independently. However, it seems the same isn't possible in CLion. Each of the source files I use to solve a problem contains a main() function, and CMake is unhappy about that everytime I attempt to compile ("multiple definition of 'main'").
Is there a way to configure CLion to only compile and execute a single source file in a project at a time without having to rewrite my CMakeLists.txt or create a new project for every problem everytime?
I'm aware that C is compiled and not interpreted like Java or Python, but I could conceivably just compile every single source file manually. Is there a way to configure CLion to do the same? If so, how?