<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
span.gmail-m-1701519146603925782gmail-pre
        {mso-style-name:gmail-m_-1701519146603925782gmail-pre;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=FR link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal>I think that you are looking for the toolchain files :</p><p class=MsoNormal><a href="https://cmake.org/cmake/help/v3.0/manual/cmake-toolchains.7.html">https://cmake.org/cmake/help/v3.0/manual/cmake-toolchains.7.html</a></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The other option is to use a cmake script to specify your variables which includes CMakelists.txt (or the other way around if you can modify the CMakelists.txt). This would be quite similar to ctests scripts.</p><p class=MsoNormal>Some good examples are in Daniel Pfeifer’s « Effective cmake » talk <a href="https://github.com/boostcon/cppnow_presentations_2017/blob/master/05-19-2017_friday/effective_cmake__daniel_pfeifer__cppnow_05-19-2017.pdf">https://github.com/boostcon/cppnow_presentations_2017/blob/master/05-19-2017_friday/effective_cmake__daniel_pfeifer__cppnow_05-19-2017.pdf</a></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal style='border:none;padding:0cm'><b>De : </b><a href="mailto:bitminer@gmail.com">Brian Davis</a><br><b>Envoyé le :</b>mardi 8 août 2017 20:09<br><b>À : </b><a href="mailto:cmake@cmake.org">cmake Mailing List</a><br><b>Objet :</b>[CMake] CMake equivalent to Boost.Build site-config.jam oruser-config.jam</p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal style='margin-bottom:12.0pt'><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/html/bbv2/recipies/site-config.html</a></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'>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"</p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'>such as </p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'>set( CMAKE_INSTALL_PREFIX ${CURRENT_LIST_DIR}/install CACHE STRING "" FORCE)<br>set( CMAKE_DEBUG_POSTFIX d CACHE STRING "" FORCE )<br><br></p></div><div><p class=MsoNormal>There is cmake.exe</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'>-C <initial-cache> </p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'>but requires command line</p></div><div><p class=MsoNormal>come to think of it would be nice if </p><p class=MsoNormal><span class=gmail-m-1701519146603925782gmail-pre><span style='font-size:10.0pt;font-family:"Courier New"'>set( CMAKE_GENERATOR_PLATFORM "Visual</span></span><code><span style='font-size:10.0pt'> </span></code><span class=gmail-m-1701519146603925782gmail-pre><span style='font-size:10.0pt;font-family:"Courier New"'>Studio</span></span><code><span style='font-size:10.0pt'> </span></code><span class=gmail-m-1701519146603925782gmail-pre><span style='font-size:10.0pt;font-family:"Courier New"'>12</span></span><code><span style='font-size:10.0pt'> </span></code><span class=gmail-m-1701519146603925782gmail-pre><span style='font-size:10.0pt;font-family:"Courier New"'>2013</span></span><code><span style='font-size:10.0pt'> </span></code><span class=gmail-m-1701519146603925782gmail-pre><span style='font-size:10.0pt;font-family:"Courier New"'>Win64" )</span></span></p><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</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</p><p>7) Delete Cache</p><p>8) Return to 3</p><p>9) Doopy doopy doo whatever else</p><p><o:p> </o:p></p></div></div><p><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>