<div class="gmail_quote">On Fri, Sep 17, 2010 at 3:22 AM, David Aldrich <span dir="ltr">&lt;<a href="mailto:David.Aldrich@eu.nec.com">David.Aldrich@eu.nec.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">









<div link="blue" vlink="purple" lang="EN-GB">

<div>

<p class="MsoNormal"><span style="font-size: 10.5pt;">Hi
Chris</span></p>

<p class="MsoNormal"><span style="font-size: 10.5pt;"> </span></p>

<p class="MsoNormal"><span style="font-size: 10.5pt;">Thanks
for your reply.</span></p><div class="im">

<p class="MsoNormal"><span style="font-size: 10.5pt;"> </span></p>

<p class="MsoNormal">&gt;The message() and file(REMOVE) commands will be executed
when you run CMake. </p>

<p class="MsoNormal">&gt;The command to generate the .cpp file won&#39;t be executed
until you run make.<span style="font-size: 10.5pt;"></span></p>

<p class="MsoNormal"><span style="font-size: 10.5pt;"> </span></p>

</div><p class="MsoNormal"><span style="font-size: 10.5pt;">I
don’t think I have ‘got’ CMake yet. I am now definitely
confused!</span></p>

<p class="MsoNormal"><span style="font-size: 10.5pt;"> </span></p>

<p class="MsoNormal"><span style="font-size: 10.5pt;">During
normal development, i.e. when the CMakeLists.txt files are complete, do I execute
CMake or make to build the app?</span><br></p></div></div></blockquote><div><br>Both. CMake is a Makefile generator; it&#39;s more akin to autoconf. Once you&#39;ve run cmake once, you&#39;ll run &quot;make&quot; whenever you need to recompile.<br>
</div><div><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div link="blue" vlink="purple" lang="EN-GB"><div>

<p class="MsoNormal"><span style="font-size: 10.5pt;">If
the answer is ‘make’, what is the point of functions such as
message() and file() only working when I execute CMake?</span></p></div></div></blockquote><div><br>There&#39;s lots of things you can do at configuration time that might require moving files around or outputting messages, such as creating local config.h files and the like. Our project&#39;s CMakeLists comprise thousands of lines, so have status output is a necessity!<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div link="blue" vlink="purple" lang="EN-GB"><div>

<p class="MsoNormal"><span style="font-size: 10.5pt;"> </span></p>

<p class="MsoNormal"><span style="font-size: 10.5pt;">I
am struggling with the online CMake documentation. The API is well defined, but
there seems to be description of CMake concepts. Some more words would be
helpful!</span></p></div></div></blockquote><div><br>Yeah, documentation is the #1 downside to CMake. It can do many marvelous things - its integration with CTest to run test suites is a biggie. But the learning curve is not trivial, and it&#39;s much steeper than it needs to be due to lack of documentation.<br>
<br>The CMake Book is nice to have, although IMHO still not totally complete.  There is a lot of good info in the CMake FAQ, though:<br><br><a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div link="blue" vlink="purple" lang="EN-GB"><div><div class="im">

<p class="MsoNormal"><span style="font-size: 10.5pt;"> </span></p>

<p class="MsoNormal">&gt; Wouldn&#39;t it make more sense to generate the source file
into the binary directory and just leave it there?<span style="font-size: 10.5pt;"></span></p>

<p class="MsoNormal"><span style="font-size: 10.5pt;"> </span></p>

</div><p class="MsoNormal"><span style="font-size: 10.5pt;">Yes,
that’s a good point. I will look at doing it that way. My only argument
against it is that I will have to configure svn to ignore that source file.</span></p></div></div></blockquote><div><br>No, you shouldn&#39;t have to, unless you&#39;re using in-source builds which is very strongly deprecated. Once you&#39;ve gotten used to out-of-source builds you&#39;ll never want to go back. Read section 3 of the FAQ about out-of-source builds.<br>
<br>Good luck,<br>Ceej<br>aka Chris Hillery<br></div></div>