<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div>So here are the problems you are going to run into with Eclipse and CMake. </div><div><br class="webkit-block-placeholder"></div><div>There is no proper integration between CMake and Eclipse.</div><div><br class="webkit-block-placeholder"></div><div>There is no plugin that can manage the CMake file and the C++ project together. In other words, Eclipse has 2 types of Projects: Managed C++ and Makefile. If you let Eclipse manage your project it will produce makefiles. This is NOT what you want. If you tell Eclipse you want a "Makefile" project, then _you_ have to generate the makefile for Eclipse. You can also tell Eclipse which makefile to use when Eclipse runs "make" to build the project. This is done as a custom build command. I usually use "make -C ${project_loc}/Build" for mine. If you have true "out of source" builds your build command might be "make -C ${project_loc}/.../ProjectBuild".</div><div><br class="webkit-block-placeholder"></div><div>Eclipse CDT indexing can be tricky to get "right". Make sure you understand how Eclipse defines its "Paths and Symbols" entries. </div><div><br class="webkit-block-placeholder"></div><div>Also, if you could elaborate on your "Complex purposes" the cmake community will be eager to help you solve those issues and come up the cmake learning curve quickly as possible.</div><div><br class="webkit-block-placeholder"></div><div>If you are cross-compiling there are some entries on the wiki about that.</div><div><br class="webkit-block-placeholder"></div><div>Respectfully</div><div>Mike Jackson</div><br><div><div>On Feb 3, 2008, at 5:38 PM, Giualian Sander wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Mike,<br><br>Thanks a lot for your advices, <br><br>I perfectly understand your point of view but in my case I'm willing to bring some capabilities to a "population" of developers (not necessarily hackers), that can enables us to abstract from the lowest layers of computing (usually autohell-handled).<br> <br>Your contribution, unfortunately, do'nt help me... <br><br>Using CMake the way your example suggest, seems to me irrelevant for a 3 lines Makefile just do the trick.<br><br>I need CMake for much more complex purposes...<br> <br>BRgds<br><br><div><span class="gmail_quote">2008/2/3, Mike Jackson &lt;<a href="mailto:imikejackson@gmail.com">imikejackson@gmail.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div style=""> I gave that plugin a try out and while it is nice to graphically "see" the structure of a CMake file there did not seem to be any actual project management or any other features that I could figure out. <div><br> </div><div>I work with CMake and Eclipse (On OS X and Linux 64) all day long. You have already heard from one individual on his project setup so I will throw mine in. </div><div><br></div><div><a href="http://www.cmake.org/Wiki/CMake:Eclipse_UNIX_Tutorial" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.cmake.org/Wiki/CMake:Eclipse_UNIX_Tutorial</a></div> <div><br></div><div>Basically I primarily use the terminal with cmake/ccmake to generate the makefiles for my system, then use Eclipse in "Makefile Project" mode to do the actual development of code and compilation. As long as you are using a compiler that Eclipse understands, Eclipse will parse the compiler output and display errors and warnings for you. </div> <div><br></div><div>I find this works very well for my needs.</div><div><div style="margin: 0px;"><br></div></div><div>I do second the idea of using &lt;<a href="http://www.cthing.com/CMakeEd.asp" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.cthing.com/CMakeEd.asp</a>&gt; for a nice CMake editor. Within eclipse there are ways to create "External Tools" that could possibly bootstrap the whole process if needed. </div> <div><br></div><div>When working with Eclipse I _strongly_ recommend you put your build directory inside the top level of your project. Eclipse seems to work better that way. In the latest CMake CVS there are eclipse project generators. You are welcome to give those a try to see if they gel with your project layout needs.</div> <div><br></div><div>My basic Project setup is:</div><div><br></div><div>-Project</div><div>  -src // All source files</div><div>  -Resources // All extra files the project needs</div><div>  -Build // Run cmake from in here (cmake ../)</div> <div><br></div><div>This works for _me_ in my situation. My projects can be viewed here: &lt;<a href="http://titanium.imts.us/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://titanium.imts.us/</a>&gt;. Also, a small bit of advice for those new to CMake: Watch how you name files and folders that might be at the top level of your project. Sometimes it is tempting to do something like:</div> <div><br></div><div><div>-Project</div><div>  -src // All source files</div><div>  -Resources // All extra files the project needs</div><div>  -cmake // Cmake related files in here</div><div>  -Build // Run cmake from in here (cmake ../)</div> </div><div><br></div><div>Problem with that is at some point you _will_ accidentally run cmake from within the project directory. CMake creates _lots_ of its own files. All with Cmake somewhere in the name. If you also have a top level folder with CMake in the name it can be difficult to figure out which files/folders need to be trashed. This is why is use "Resources" and then put some of my special cmake files in that folder. </div> <div><br></div><div>Just FYI. Welcome to the cmake community.</div><div>-----------</div><span class="sg"><div>Mike Jackson</div></span><div><span class="e" id="q_117e0750b476377a_2"><div><br></div><div><br></div><div><div> <div>On Feb 2, 2008, at 6:52 PM, Giualian Sander wrote:</div><br><blockquote type="cite">Hi gents,<br><br>I'm new to cmake, and I've found a project called CMakeBuilder (<a href="http://www.cmakebuilder.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">www.cmakebuilder.com</a>) across the internet.<br> <br>I'm a C++/Autohell developer from years (let's says decades !) And I found interesting the visual approach of this tool, especially for understanding CMake structure and syntax.<br> <br><br>Even if it's beta right now, I think it brings some "easy to learn"-capability to CMake<br> <br>Do anyone of you know about the upcoming features as described on <a href="http://eclipseplugincentral.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">eclipseplugincentral.com</a> ?<br><br> I'm currently in charge of a "from scratch" project, working with a lot of eclipse/C++ developers, and I'm not willing to maintain a AutoHell configuration on such a scale.<br> <br>Thought I'm conviced that CMake is the right choice for me, is such a plugin a good choice for me ?<br> <br>Thanks for your advices....<br><br>BRgds<br><span> <br>Giualian Sander<br></span><div style="margin: 0px;"><br></div></blockquote></div></div></span></div></div></blockquote></div><br></blockquote></div><br></body></html>