[Dune] building/installing dune core modules out of source directory
Simon Praetorius
Simon.Praetorius at tu-dresden.de
Mon Jan 22 11:01:24 CET 2018
Hi Domonic,
> 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.
OK, I see. That's why building all the dune core modules worked fine
with the common build-directory. But this enforces that I build all
projects in the same directory, also if they are not core modules.
This is a workflow I don't like.
> 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 what I wanted to avoid. If I have to specify all dune
installation dirs manually, I can omit the dunecontrol script
completely and use cmake from the beginning.
What I expected to have in dunecontrol is a script that manages
relationship between build/installed dune modules and sets all paths
for the correct cmake configuration automatically, if I just specify
the DUNE_CONTROL_PATH. And this independent of how/where I
build/install the dune modules. Maybe my expectation is wrong.
My workaround for the installation of dune modules is, to set the same
`-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}` for all dune modules and then
to add the cmake flag `-DCMAKE_PREFIX_PATH:PATH=${INSTALL_DIR}` in my
opts file of my own project.
Best wishes,
Simon
>
> 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
--
Dr. Simon Praetorius
Institut für Wissenschaftliches Rechnen
Fakultät Mathematik
Technische Universität Dresden
Tel.: TUD-34432
Mail: simon.praetorius at tu-dresden.de
Web: www.math.tu-dresden.de/~spraetor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5753 bytes
Desc: S/MIME-Signatur
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20180122/b7d04e42/attachment.bin>
More information about the Dune
mailing list