<div dir="ltr">That's a very useful feature to have! Ideally CMake would also try to load it recursively up to the "/" folder just like for instance clang-format or clang-tidy look for their configuration folders upwards. This would allow for instance to easily build all the projects in a certain folder in release mode by default or stuff like this.<br><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><br></div><div><font color="#783f04"><br></font></div><div><font color="#134f5c" size="2" face="arial, helvetica, sans-serif">-------</font></div><font color="#134f5c" size="2" face="arial, helvetica, sans-serif">Jean-Michaël Celerier</font><div><font color="#134f5c" size="2" face="arial, helvetica, sans-serif"><a href="http://www.jcelerier.name" target="_blank">http://www.jcelerier.name</a></font></div></div></div></div>
<br><div class="gmail_quote">On Wed, Aug 9, 2017 at 12:20 PM, Cristian Adam <span dir="ltr"><<a href="mailto:cristian.adam@gmail.com" target="_blank">cristian.adam@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Aug 8, 2017 at 8:08 PM, Brian Davis <span dir="ltr"><<a href="mailto:bitminer@gmail.com" target="_blank">bitminer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br>Is there a CMake equivalent to a site-config.jam or user-config.jam<br><br><a href="http://www.boost.org/build/doc/html/bbv2/recipies/site-config.html" target="_blank">http://www.boost.org/build/doc<wbr>/html/bbv2/recipies/site-confi<wbr>g.html</a><br><br></div><div>basically a CMake file the user can put in a project directory that CMake will read first when using cmake-gui that allows user to specify stuff they don't want to have to keep specifying in cmake-gui each "delete cache"<br><br></div><div>such as <br><br></div><div>set( CMAKE_INSTALL_PREFIX ${CURRENT_LIST_DIR}/install CACHE STRING "" FORCE)<br>set( CMAKE_DEBUG_POSTFIX d CACHE STRING "" FORCE )<br><br><br></div><div>There is cmake.exe<br></div><div><br></div><div>-C <initial-cache> <br><br></div><div>but requires command line<br><br></div><div>come to think of it would be nice if <br><dl class="m_-2610661702184678583m_3686759135703537478gmail-m_-1701519146603925782gmail-docutils"><dt><code class="m_-2610661702184678583m_3686759135703537478gmail-m_-1701519146603925782gmail-docutils m_-2610661702184678583m_3686759135703537478gmail-m_-1701519146603925782gmail-literal"><span class="m_-2610661702184678583m_3686759135703537478gmail-m_-1701519146603925782gmail-pre">set( CMAKE_GENERATOR_PLATFORM "Visual</span> <span class="m_-2610661702184678583m_3686759135703537478gmail-m_-1701519146603925782gmail-pre">Studio</span> <span class="m_-2610661702184678583m_3686759135703537478gmail-m_-1701519146603925782gmail-pre">12</span> <span class="m_-2610661702184678583m_3686759135703537478gmail-m_-1701519146603925782gmail-pre">2013</span> <span class="m_-2610661702184678583m_3686759135703537478gmail-m_-1701519146603925782gmail-pre">Win64" )</span></code></dt></dl><p>in desired user config file and CMake would just "make it so" on clicking Generate.</p><p>I can do this with my own projects, by implementing it myself, but when checking out 3rd party projs they can be all over the map on config allowing a user-config.cmake would provide mechanism to tame the config problems.</p><p>Desired workflow</p><p>1) Checkout 3rd party proj</p><p>2) put a CMakeUser.txt or whatever file per project</p><p>3) Run CMake GUI Generate<br></p><p>4) Click Open Project</p><p>5) Change whatever manual bits in in gui</p><p>6) Update project suing git witch branches versions<br></p><p>7) Delete Cache</p><p>8) Return to 3</p><p>9) Doopy doopy doo whatever else</p></div></div></blockquote><div><br></div></div></div><div>There is the (undocumented) <a href="https://gitlab.kitware.com/cmake/cmake/blob/master/Source/cmake.cxx#L1507" target="_blank">PreLoad.cmake</a>, which acts like giving a precache file with -C command line argument.</div><div><br></div><div>But, as it turns out, it doesn't work with server mode :(</div><div><br></div><div>Cheers,</div><div>Cristian.</div><div> </div></div></div></div>
<br>--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/cmake</a><br></blockquote></div><br></div></div>