[Cmake] suggestion: make distclean

Brad King brad.king at kitware.com
Wed Mar 5 14:41:37 EST 2003


> Why not implemement "make distclean" to remove all files produced with
> cmake (e.g. CMakeCCompiler.cmake CMakeCXXCompiler.cmake CMakeCache.txt,
> ...) make clean only removes the files generated by the compiler.

CMake supports true out-of-source builds for all projects on all
platforms.  The encouraged behavior is to use separate, initially empty
tree as the build tree, and point cmake at the real source tree.  The
source tree is left untouched.  To "distclean", one need only delete the
build tree.  The "make clean" target is provided so a new build can be
done without reconfiguring all the settings in the CMakeCache file.

If you want to try to add a "make distclean" target that is useful for
in-source builds, look at cmLocalUnixMakefileGenerator.cxx in the CMake
source.  We've always found it more convenient to use out-of-source builds
because many configurations can be built with a single source tree.

-Brad




More information about the CMake mailing list