On Wed, Oct 6, 2010 at 2:10 PM, <aaron.mead...@thomsonreuters.com> wrote:

>  *Hi all.*
>
> * *
>
> *Is there a good way to disallow in-source builds?  Ideally, I’d like to
> prevent it before any cruft is written into the source tree.  I experimented
> with writing a function into my CMakelists file and calling it.  The
> function checked if CMAKE_BINARY_DIR was equal to CMAKE_SOURCE_DIR and
> messaged a FATAL_ERROR if that was the case.  This works ok, but still
> generates a CMakeFiles directory and a CMakeCache.txt file.*
>


> * **The second half of the question is of course, is there an easy way to
> clean out a source tree if an in-source build was accidentally kicked off?
> (short of dividing the files by their timestamp and removing the newer ones,
> etc..)*
>

CMake doesn't have a command to clean up after itself which seems to be what
you're asking for (it would help for both use-cases you specify).  This is
kind of related to my ticket asking for a distclean target, so I'll just
throw it out there in case anyone has some free time on their hands.

http://www.cmake.org/Bug/view.php?id=6647

-- 
Philip Lowman
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to