Split CMakeLists.txt
Building tests with cmake