[cmake-developers] To warn or to error out ? - wording and compatiblity
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. -- 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 ? Alex -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] To warn or to error out ? - wording and compatiblity
On Tuesday 01 November 2011, Eric Noulard wrote: 2011/11/1 Alexander Neundorf neund...@kde.org: ... and I'd be very happy if this could be solved. Me too. I'll dig a little bit on the Eclipse side again, but generating 2 files in the source does not look like a big deal. The thing is that it would not be possible to create multiple build trees with Eclipse project files for one source tree (because the .project/.cproject files from one build tree would overwrite the .project/.cproject files from the other build trees). Do you know whether adding the source dirs as SOURCE pathentries maybe makes the version control stuff appear ? Alex -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] To warn or to error out ? - wording and compatiblity
2011/11/1 Alexander Neundorf neund...@kde.org: On Tuesday 01 November 2011, Eric Noulard wrote: 2011/11/1 Alexander Neundorf neund...@kde.org: ... and I'd be very happy if this could be solved. Me too. I'll dig a little bit on the Eclipse side again, but generating 2 files in the source does not look like a big deal. The thing is that it would not be possible to create multiple build trees with Eclipse project files for one source tree (because the .project/.cproject files from one build tree would overwrite the .project/.cproject files from the other build trees). Do you know whether adding the source dirs as SOURCE pathentries maybe makes the version control stuff appear ? I don't know but I doubt it. (I tried: pathentry kind=src path=[Source directory]/ but this does not seem to have changed anything). As far as I understand the eclipse team sharing model implies that a project is shared as a whole not part of it. -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
Re: [cmake-developers] To warn or to error out ? - wording and compatiblity
On Tue, Nov 1, 2011 at 5:58 AM, Alexander Neundorf neund...@kde.org wrote: 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. -- 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 ? Alex -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers I think a warning is good enough here. I would phrase it in the positive sense, rather than in the negative sense, though: Rather than: 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. How about It is strongly recommended to use a build directory which is a sibling of the source directory. -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers