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

Dominic Kempf dominic.r.kempf at gmail.com
Mon Jan 22 10:36:15 CET 2018


Hey Simon,

I am no expert on installation issues, so I will only try to answer the
first part:

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.

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20180122/8a5cb161/attachment.htm>


More information about the Dune mailing list