[Dune] building/installing dune core modules out of source directory

Christian Engwer christian.engwer at uni-muenster.de
Mon Jan 22 13:03:21 CET 2018


Hi Dominic,

> DUNE_CONTROL_PATH is only used to find sources of Dune modules, not
> their builds, so the behaviour you see is to be expected. If you want to
> build
> a module against a specific set of build directories, the easiest way to do
> it is
> building it through dunecontrol with the same --builddir=... flag set as
> when you
> build the original set of modules.

this is only half true. dunecontrol used to find also installed Dune
modules and pass the correct flags to the build tools. I also observed
the behaviour Simon describes and I miss the old help. At that time
all oyu had to do is add $PREFIX/lib/dunecontrol to the
DUNE_CONTROL_PATH. This allows dunecontrol to check the modules and
report missing modules. At the same time it used to add additional
flags to ensure correct configuration. Currently this seems not to
work anymore. I guess it should not be too difficult to reactivate
this behaviour... dunecontrol knows about the path, it can easily
destinguish between installed modules and sources and then it just
needs to generate the correct -Ddune...DIR=... options for cmake.

I'm not sure where it breaks and in how many cases it works. It is
just what I observed in one particular case a few months ago.

Ciao
Christian

>
> Another way, if you need to mix and match is what you describe later in the
> context
> of installation: Explicitly stating the build directories through
> -Ddune-foo_DIR=...
> Note that you need to pass the root of the build directories there (not
> say, the lib
> subdir etc.)
>
> This is from the top of my head, without trying, but I have similar
> workflows, that
> work nice for me.
>
> Best,
> Dominic
>
> On Sat, Jan 20, 2018 at 2:57 PM, Simon Praetorius <
> simon.praetorius at tu-dresden.de> wrote:
>
> > Hi everyone,
> >
> > when I build the dune modules, I can use two different build locations: 1.
> > default is a subdirectory `build-cmake` in each module source directory, 2.
> > passing a `--builddir=BUILD_DIR` flag to dunecontrol with an absolute path
> > BUILD_DIR, all modules are build in ${BUILD_DIR}/dune-xxx
> >
> > How can I use these build dune-modules in my own project? When I call
> >
> > > DUNE_CONTROL_PATH=${BUILD_DIR} dunecontrol --current all
> >
> > in my own dune project directory, it fails since dunecontrol can not find
> > the `dune.module` files in the ${BUILD_DIR}/dune-xxx subdirectories that
> > are necessary for determining the module dependencies. These files are
> > simply not copied in the build directories.
> >
> > Alternatively, I have installed all dune modules in a common location:
> >
> > > CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR}" dunecontrol
> > --builddir=${BUILD_DIR} all
> > > CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR}" dunecontrol
> > --builddir=${BUILD_DIR} make install
> >
> > How can I use these installed dune-modules in my own project? When I call
> >
> > > DUNE_CONTROL_PATH=${INSTALL_DIR} dunecontrol --current all
> >
> > in my own dune project directory, it fails since all package directories
> > necessary for cmake are set in a wrong way, i.e. it calls cmake with the
> > parameters
> >
> > > -Ddune-common_DIR=${INSTALL_DIR}/lib/dunecontrol/dune-common
> > -Ddune-geometry_DIR=...
> >
> > But in `.../lib/dunecontrol/dune-common` there is no
> > `dune-common-config.cmake` file. This file is located in
> > `${INSTALL_DIR}/lib64/cmake/dune-xxx` and some others in
> > `${INSTALL_DIR}/lib/cmake/dune-xxx`
> >
> > What have I done wrong?
> >
> > Best regards,
> > Simon
> >
> >
> > _______________________________________________
> > Dune mailing list
> > Dune at lists.dune-project.org
> > http://lists.dune-project.org/mailman/listinfo/dune

> _______________________________________________
> Dune mailing list
> Dune at lists.dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune


--
Prof. Dr. Christian Engwer
Institut für Numerische und Angewandte Mathematik
Fachbereich Mathematik und Informatik der Universität Münster
Einsteinstrasse 62
48149 Münster

E-Mail  christian.engwer at uni-muenster.de
Telefon +49 251 83-35067
FAX     +49 251 83-32729




More information about the Dune mailing list