[CMake] Disallowing in-source builds

kent williams nkwmailinglists at gmail.com
Thu Oct 7 10:04:06 EDT 2010


Two things:  You should have your source code under version control,
for many reasons, but in this context:

1. The VC system can tell you which files are unknown to it, i.e.
those CMake pooped all over your source tree.
2. You can make sure your work is checked in, then delete the source
directory and start fresh.

Second: The post-CMake cleanup is by no means straightforward, because
of what CMake's capabilities. You can have it generate blizzards of
thousands of new files if that's what you want.  CMake would, in
effect, to run its configure process in reverse to truly clean up from
any arbitrary set of CMakeLists.txt instructions.

This would be a huge effort, and all to solve a problem that is
actually between the chair and the keyboard.

Software -- especially software for developers -- can't prevent every
dumb thing a user can do. If it tries, it will end up tied in knots,
and become inflexible and annoying to use.


More information about the CMake mailing list