Simplify CMakeLists.txt

* Do not specify every source file individually
* Change the way flags are specified