A lot of projects that use CMake already have a `./cmake` directory, I would think `./cmake/init.json` would fit nicer as opposed to the hidden directory. I'm not a fan of hidden directories in software projects anyway.
I would prefer an init file be written as a CMake file instead of JSON. JSON is nice because it plays well with GUIs, but I think using CMake syntax will function better if the file ever needs to be a bit more complicated. On Fri, Nov 9, 2018, 07:14 Brad King <brad.k...@kitware.com wrote: > 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 >
-- 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