[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] How to pass a configuration file to CMake?
From:       Cedric Doucet <cedric.doucet () inria ! fr>
Date:       2015-12-21 12:29:05
Message-ID: 726390889.4117381.1450700945898.JavaMail.zimbra () inria ! fr
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Peter! 

Thank you very much! 
It seems to be exactly what I want. :) 
I will try to use it. 

Cédric 

----- Mail original -----

> De: "Petr Kmoch" <petr.kmoch@gmail.com>
> À: "Cedric Doucet" <cedric.doucet@inria.fr>
> Cc: cmake@cmake.org
> Envoyé: Lundi 21 Décembre 2015 13:25:53
> Objet: Re: [CMake] How to pass a configuration file to CMake?

> Hi Cedric.

> I have never used it myself, but I believe you're looking for CMake's
> command-line option '-C <initial-cache>':
> https://cmake.org/cmake/help/latest/manual/cmake.1.html

> Petr

> On Mon, Dec 21, 2015 at 1:12 PM, Cedric Doucet < cedric.doucet@inria.fr >
> wrote:

> > Hello,
> 

> > I would like to know if it's possible to pass a configuration file to
> > CMake.
> 
> > I have to pass a lot of information to CMake and the resulting command line
> > is very long to type.
> 
> > Would it be possible to create a file containing all needed definitions and
> > pass it to CMake?
> 

> > For exemple, instead of typing
> 

> > cmake -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=/home/me/there -D
> > CMAKE_CXX_COMPILER=/usr/local/gcc/4.9.3/g++
> 

> > would it be possible to create a file containing
> 

> > CMAKE_BUILD_TYPE=Debug
> 
> > CMAKE_INSTALL_PREFIX=/home/me/there
> 
> > CMAKE_CXX_COMPILER=/usr/local/gcc/4.9.3/g++
> 

> > and pass it to CMake?
> 

> > Cédric
> 

> > --
> 

> > 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:
> 
> > http://public.kitware.com/mailman/listinfo/cmake
> 

[Attachment #5 (text/html)]

<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:norm \
al;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>De: \
</b>"Petr Kmoch" &lt;petr.kmoch@gmail.com&gt;<br><b>À: </b>"Cedric Doucet" \
&lt;cedric.doucet@inria.fr&gt;<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 &lt;initial-cache&gt;': <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">&lt;<a href="mailto:cedric.doucet@inria.fr" \
target="_blank">cedric.doucet@inria.fr</a>&gt;</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>



-- 

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:
http://public.kitware.com/mailman/listinfo/cmake



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic