I have seen that cmake does not have cmake clean
from Looking for a 'cmake clean' command to clear up cmake output, When using cmake as to the following situation:
source file change
CMakeLists.txt change
add new file or directory
subdirectory(cmake) change
and do on.
We may need rebuild the project, lots of people will do rm -rf *
in the build directory to clear the last build, and then cmake ..
make
to rebuild the project.This maybe very slow if the project is very big.And in some situation there is no need, just do make is enough.
So my question is when should we do rm -rf *
in the build directory and then rebuild the project and when not ? Is there any best practice?