[Dune] dune-alugrid / dune-grid

Martin Rückl mrueckl at physik.hu-berlin.de
Wed Apr 6 18:40:28 CEST 2016


Hi Martin ():-)
I think cmake has some special find_package mode where it provides the 
build settings. (I think I have used it a year ago and its called config 
mode. But im not sure and I'm not very familiar with it).
In those files stuff like:
     add_definition(ENABLE_FOOBAR)
     set(CXX_COMPILER ...)
     include_directories(...)
could be incorporated. Basically it holds the upstream build 
configuration which is required to be reused in derived projects. If 
such a cmake build configuration is provided by the dune modules, i can 
just incorporate these config files in my own CMakeLists file and 
completely drop the config.h.
At the moment i just include the config.h from dune-alugrid in all my 
.cpp files, which is not very satisfying :-/ BUT: it works o.0

Maybe I'll dig out that project where I used that find_package config 
mode...

Thanks for #1 and #2 :)

Martin





On 06/04/16 18:19, Martin Nolte wrote:
> Hi Martin,
>
> for questions 1 and 2, the answer is yes.
>
> As for 3: You will definitely need to set some preprocessor variables (e.g.,
> HAVE_ZLIB if you compiled dune-alugrid with zlib support enabled). Where do
> you intend to do this?
>
> Best,
>
> Martin
>
> On 04/06/2016 05:20 PM, Martin Rückl wrote:
>> Hi Guys,
>> I am about to update my own dune based code to 2.4.1 and run into some issues.
>> Ive cloned the git repos for;
>>
>>      dune-common
>>      dune-grid
>>      dune-localfunctions
>>      dune-pdelab
>>      dune-alugrid
>>      dune-typetree
>>      dune-geometry
>>      dune-istl
>>
>> Then i did a
>>
>>      dunecontrol git checkout releases/2.4
>>
>> which worked. Then i did a
>>
>>      dunecontrol all
>>
>> wich did build all libraries with cmake. So far so good. Now in my own project
>> i have a FindDune.cmake file which finds libraries and include directories all
>> the dune-module from above.
>>
>> Now I have some questions:
>>
>>   1. In dune-grid/release2.4.1 there is a dune/grid/alugrid folder. This folder
>>      is gone in master branch. Hence I assume that it is/was for the old legacy
>>      ALUgrid package (i.e. the one which is not a dune module but third party
>>      library). Correct: yes/no
>>   2. If I am correct and want to use 3d alugrid, should i only include files
>>      from dune/alugrid/... which comes from the dune-alugrid package? yes/no?
>>   3. How to deal with the config.h files in the several dune-modules? I REALLY
>>      want to avoid having a config.h file in my own project. Should i set the
>>      appropriate HAVE_FOOBAR (or was it ENABLE_FOOBAR) flags within my own
>>      CMakeLists file (i.e. where i check for the different dune-modules)
>>
>> I think #3 is hard, but I'm willing to walk through the pain!
>>
>> Thanks,
>> Martin
>>
>>
>>
>>
>> _______________________________________________
>> Dune mailing list
>> Dune at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune
>>





More information about the Dune mailing list