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

Simon Praetorius simon.praetorius at tu-dresden.de
Sat Jan 20 14:57:16 CET 2018


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





More information about the Dune mailing list