[Dune-devel] Experiences using Eclipse + cmake
Dominic Kempf
dominic.r.kempf at gmail.com
Mon Sep 15 09:35:24 CEST 2014
Dear Dune,
I have spent a day or so on exploring the eclipse project file generator
for cmake. The good news is: The cmake build system of Dune generates
working Eclipse project files without any additional tweaking. In order to
do that, you have to change the "generator" cmake is using from the
standard "Unix Makefiles" to "Eclipse CDT4 - Unix Makefiles". You can do
that by setting the CMake option -G. This is also possible via dunecontrol
by adding it to the optsfile:
CMAKE_FLAGS="-G'Eclipse CDT4 - Unix Makefiles'"
However there is also bad news. These dont originate from the Dune
buildsystem side, but rather from the Eclipse side:
1) Eclipse has problems handling outofsource builds, where the build
directory is a subdirectory of the source directory. This is the default
way in Dune. In this light, an implementation of my proposal in FS1478
<https://dune-project.org/flyspray/index.php?do=details&task_id=1478>would
make even more sense. The problem is so well known, that cmake itself
outputs a warning about this.
2) Using the version control plugins provided by Eclipse requires the
project file to be at the root of the source tree. However, in cmake
projects, it is at the root of the build tree and the version control
plugins fail. This is a hard limitation on the Eclipse side which is okay
for native Eclipse projects, where the project is part of the source. It
does contradict the CMake workflow of generating project files though. This
is also a known issue, links to discussion can be found here
<http://www.cmake.org/Wiki/Eclipse_CDT4_Generator#Discussion_about_limitations>
.
Apart from these two things I have stumbled upon, the generated projects
look really good. Even stuff like the module dependencies were detected
correcty without additional tweaking.
See you all next week,
Dominic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20140915/db8fbf02/attachment.htm>
More information about the Dune-devel
mailing list