To remove the build directory and all files that have been created after running cmake –build ., run at the top level of your project the following command:
cmake -P clobber.cmake(The -P argument passed to CMake will execute a script <filename>.cmake.)