<br><br><div class="gmail_quote">2009/7/12 Tyler Roscoe <span dir="ltr"><<a href="mailto:tyler@cryptio.net">tyler@cryptio.net</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I hope this is a real email address. Posting from a fake one is sketchy.<br>
<div class="im"><br>
On Sat, Jul 11, 2009 at 06:04:48PM -0700, ML wrote:<br>
> 1. Is there a doc that describes the 'bare essentials' to a CMake<br>
> file. What I absolutely need to have in the file.<br>
<br>
</div>I think there's one somewhere on the wiki, and there are other examples<br>
that google will find. The _Mastering CMake_ book has a tutorial chapter<br>
that is helpful but not essential.<br>
<div class="im"><br>
> 2. Can I call my Cmake file anything? Or do I have to call it<br>
> CMakeLists.txt?<br>
<br>
</div>You can call it something else but I wouldn't recommend it. Actually I'm<br>
not sure if add_subdirectory() will take a file name (but it might).<br>
<div class="im"><br>
> 3. Can CMake check out code from SVN?<br>
><br>
> 4. Can CMake e-mail build results to a specified e-mail address?<br>
<br>
</div>You'll probably want to use CDash for these types of activities. CDash<br>
is sort of an automation/continuous integration wrapper for CMake. It<br>
has its own website, but it integrates nicely with CMake.<br>
<div class="im"><br>
> 5. Say I have something like:<br>
> SET(SRCS file1.c file2.c file3.c)<br>
> Can I write this like:<br>
> SET(SRCS /<br>
> file1.c /<br>
> file2.c /<br>
> file3.c<br>
> )<br>
><br>
> Like one file name per line like I can do in a gnu Make File?</div></blockquote><div>What about a long command line in ADD_CUSTOM_COMMAND? Can I break it into multiple lines? <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
<br>
</div>I'm not sure why you put those / in there (did you mean \ ?) but CMake<br>
is pretty tolerant of whitespace. Just write:<br>
<br>
set (srcs<br>
<div class="im"> file1.c<br>
file2.c<br>
file3.c<br>
)<br>
<br>
</div><div class="im">> 6. In Make I would define all of my headers too, would I do the same<br>
> as #5 above? How does the my Add_Executable statement?<br>
<br>
</div>This isn't necessary in CMake, although it does make those headers<br>
available for IDE users. You just add them right alongside the source<br>
files: add_executable (${sources} ${headers}).<br>
<div class="im"><br>
> 7. How do I tell Cmake to compile to a static library like a .a or .so<br>
> or .dll?<br>
<br>
</div>add_library() takes STATIC and SHARED flags.<br>
<br>
hth,<br>
<font color="#888888">tyler<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br>