support building and running tests with CMake