test-build: Dump CMake error log on cmake failure