Switch to using CMake for tests