Fix CMake Build

- Fix the Cmake build so that it actually works
- TODO: create tests for ctest and valgrind to run on travis