On 11/09/2018 05:34 AM, Joachim Wuttke wrote:
> include(PreventInSourceBuilds)
> 
> to protect users (and myself) from unintentionally running CMake
> in the source directory.
> 
> Would you consider adding this little module to the CMake code base?

If we are going to offer an upstream solution for this I think
it should be done in a way that avoids ever creating any files
(like CMakeCache.txt or CMakeFiles) in the first place.  This
could be achieved by looking for a `.cmake/init.json` file
at the top of the source tree with declarative information
about the project's preferences.  One of those settings could
reject in-source builds.

-Brad
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers

Reply via email to