2011/11/1 Alexander Neundorf <[email protected]>: > Hi, > > when using out-of-source builds and the Eclipse CDT project generator, a > "linked resource" is created in the Eclipse project file, which points to > CMAKE_SOURCE_DIR, so the user can browse the source directory. > > Now, when CMAKE_BINARY_DIR is a subdirectory of CMAKE_SOURCE_DIR (e.g. > MyProject/build/ ), such a "linked resource" can't be created, and the > resulting project file still works, but is less usable. > > I just added a warning, so that cmake now says: > > "-- Configuring done > CMake Warning in CMakeLists.txt: > The build directory is a subdirectory of the source directory. > > This is not supported well by Eclipse. It is strongly recommended to use a > build directory which is not a subdirectory of the source directory.
or may be use: ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT=TRUE option, and import the two projects? > -- Generating done" > > I'm thinking about using FATAL_ERROR instead of warning for this, since the > resulting project file without that link really feels wrong, and I recommend > everybody to not build in a subdir of the source dir. > This would have the effect that a build dir which was working until now does > not work anymore with the next cmake release, the user would have to create a > new build dir in some other location. > > Would this be acceptable ? I think a warning is enough, moreover where are we with the version control integration issue? http://www.vtk.org/Wiki/Eclipse_CDT4_Generator#Discussion_about_limitations I just checked that linked resource for the source does not show version control. I speak about that issue [again] because when I use eclipse+cmake I usually do it by hand with a build dir as a subdir of source dir i.e. source/build and with hand-crafted source/.project source/.cproject that way I get the source control working as expected and all the file for the concerned project are in a single dir. So before making the build dir as a source subdir case FATAL, are you sure we really don't want to authorize the generatiion of .project .cproject in the source dir in this very particular but nervertheless very useful case? I know that we should never generate files in the source dir, but after 3+ years it seems that eclipse is not able (correct me if I'm wrong) to enable source control on "part" of the project. -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
