On Aug 2, 2007, at 5:34 AM, Eric Noulard wrote:
Eclipse assume the top-level project folder MUST be under version control which is not the case with the current approach of the Eclipse CDT Generatorwhich put .project and .cproject in the Build tree (this is indeed a good idea for generated files :)) I see 3 ways to go: 1) Stick to eclipse constraint and generate .project and .cproject in the source tree and put the Build_tree as a LinkedRessourcethis is more or less the converse of what the Generator currently does.1bis) If one wants to use CMake Eclipse CDT generator and Eclipse Code Management to work he MUST do in-source built i.e. CMAKE_BINARY_DIR==CMAKE_SOURCE_DIR In this case the CDT Generator should be modified in order to detect if it has been called in- or out-of source since for a in-source built the currently generated .project does not work because it generates a "self-reference" due to the LinkRessources to itself.2) Ask Eclipse Team to consider authoring "partial" sharing of project tree.3) Accept that CMake generated Eclipse project won't offer Team Menu feature.
As an everyday, 8 hours a day, eclipse CDT user the way that _I_ have been setting up my projects is to have the CMake Build Tree rooted in a Directory called "Build", which is just inside the project directory. This was done because I was having trouble early on getting Eclipse to recognize any directory outside of the project directory as something to index, look for binaries, and such, so basically I follow #1 from above. This seemed to have worked the best for Eclipse, at least for me, from what I can tell.
Even though Eclipse is a bit "different" from other IDEs I think the CMake methodology of using out-of-source builds should still be recommended. In source builds are possible but not recommended.
As to #3, I can always "Share" a project from the Team menu after I import my project.
Also, If the .project/.cproject files are constantly regenerated then every time I make a change to my project it is going to get over written when cmake runs again. I have never really liked this in the Xcode/Visual Studio use either. Not that I know any better way to do it.. ;-)
Not sure if Eclipse CDT gets unstable when you start changing the project files out from underneath it. Xcode and Visual Studio seem to handle this pretty well. Have not had good success with this on Eclipse though. Just something to watch out for.
Again. Just some thoughts and ramblings from a current Cmake/Eclipse- CDT user.
-- Mike Jackson Senior Research Engineer Innovative Management & Technology Services _______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
