<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div><br></div><div>Hi Peter!</div><div><br></div><div>Thank you very much!</div><div>It seems to be exactly what I want. :)</div><div>I will try to use it.</div><div><br></div><div>Cédric</div><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>De: </b>"Petr Kmoch" <petr.kmoch@gmail.com><br><b>À: </b>"Cedric Doucet" <cedric.doucet@inria.fr><br><b>Cc: </b>cmake@cmake.org<br><b>Envoyé: </b>Lundi 21 Décembre 2015 13:25:53<br><b>Objet: </b>Re: [CMake] How to pass a configuration file to CMake?<br><div><br></div><div dir="ltr"><div><div>Hi Cedric.<br><div><br></div></div>I have never used it myself, but I believe you're looking for CMake's command-line option '-C <initial-cache>': <a href="https://cmake.org/cmake/help/latest/manual/cmake.1.html" target="_blank">https://cmake.org/cmake/help/latest/manual/cmake.1.html</a><br><div><br></div></div>Petr<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 21, 2015 at 1:12 PM, Cedric Doucet <span dir="ltr"><<a href="mailto:cedric.doucet@inria.fr" target="_blank">cedric.doucet@inria.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000"><div><br></div><div>Hello,</div><div><br></div><div>I would like to know if it's possible to pass a configuration file to CMake.</div><div>I have to pass a lot of information to CMake and the resulting command line is very long to type.</div><div>Would it be possible to create a file containing all needed definitions and pass it to CMake?</div><div><br></div><div>For exemple, instead of typing</div><div><br></div><div>cmake -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=/home/me/there -D CMAKE_CXX_COMPILER=/usr/local/gcc/4.9.3/g++</div><div><br></div><div>would it be possible to create a file containing</div><div><br></div><div>CMAKE_BUILD_TYPE=Debug </div><div>CMAKE_INSTALL_PREFIX=/home/me/there </div><div>CMAKE_CXX_COMPILER=/usr/local/gcc/4.9.3/g++</div><div><br></div><div>and pass it to CMake?</div><div><br></div><div>Cédric</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/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/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/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/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/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/mailman/listinfo/cmake</a><br></blockquote></div><br></div>
</blockquote><br></div></body></html>