<div class="gmail_quote">On Fri, Sep 17, 2010 at 3:22 AM, David Aldrich <span dir="ltr"><<a href="mailto:David.Aldrich@eu.nec.com">David.Aldrich@eu.nec.com</a>></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">>The message() and file(REMOVE) commands will be executed
when you run CMake. </p>
<p class="MsoNormal">>The command to generate the .cpp file won'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's more akin to autoconf. Once you've run cmake once, you'll run "make" 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'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'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'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">> Wouldn'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't have to, unless you're using in-source builds which is very strongly deprecated. Once you've gotten used to out-of-source builds you'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>