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..)

 

Thanks!

 

--aaron

 

Aaron Meadows
Software Engineer

Thomson Reuters

Phone: 314.468.3530
Mobile: 636.541.6139
aaron.mead...@thomsonreuters.com
thomsonreuters.com

 



This email was sent to you by Thomson Reuters, the global news and information 
company.
Any views expressed in this message are those of the individual sender, except 
where the sender specifically states them to be the views of Thomson Reuters.

_______________________________________________
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