How do I clean up the project files generated by CMake? [duplicate]

Is there a command with which I can clean up all those generated project files?

Yes – if you do an out-of-source build (as recommended).

To do so, create a directory – for example, build – within your projects directory and run CMake from there:

mkdir build
cd build
cmake ..
make

(Or tell your IDE to do so.)

Now all generated files are within build. To clean those, just remove the directory (rm -rf build).


PRO: You can keep all generated files out of your versioning system by adding build to its ignore 😉

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)