[Dune] using cmake to build your dune module

Sascha Zelzer s.zelzer at dkfz-heidelberg.de
Tue Dec 7 14:05:54 CET 2010


Hi,

we are also using CMake intensively for our software projects and a 
CMake base build-system for Dune modules would be great. I see the 
following two points as a huge benefit:

1.) Allow Dune modules to be located anywhere in the filesystem. Use 
something like FIND_PACKAGE(Dune) inside the modules CMakeLists.txt file 
to fetch all necessary build options from Dune. This would external 
projects to integrate their Dune-Code into their source-code layout.

2.) Allow out-of-source (aka shadow-builds) for Dune modules. I think it 
would be nice to keep the source tree clean and allow for separate 
Debug/Release builds, for example.

I might also be able to supply a FindDune.cmake file and/or my modified 
CMake scripts for my Dune module.

Best regards,

Sascha

On 12/07/2010 11:40 AM, Bernd Flemisch wrote:
> Dear Dune,
>
> this is definitely something where we would/could contribute since Dumux
> can use CMake. Nevertheless it is a time-consuming task to achieve
> something which will have all the capabilities the current buildsystem
> has. And since it is only a nice-to-have it tends to always fall behind.
> But I have not lost hope that we once can contribute something...
>
> Kind regards
> Bernd
>
> On 12/07/2010 09:46 AM, Oliver Sander wrote:
>    
>> I still think it would be convenient to have duneproject create
>> dune modules with a cmake build system instead of the AutoTools one.
>> Maybe there is a volunteer who is willing to attempt a patch?
>>
>> Anyways, thanks for the text.  It provides the dune-developer-
>> with-no-experience-in-cmake-yet with an idea of what 'switching to
>> cmake' actually means.
>>
>> best,
>> Oliver
>>
>> Am 06.12.2010 19:08, schrieb Felix Albrecht:
>>      
>>> Hi,
>>>
>>> On Mon, 2010-12-06 at 18:03 +0100, Sascha Zelzer wrote:
>>>        
>>>> I am wondering if the set of files is complete, since in
>>>> CMakeLists.txt,
>>>> variables like ALL_PKG_CPPFLAGS and DUNEMPICPPFLAGS are used but never
>>>> defined.
>>>>          
>>> as far as i know, these variables should not have to be set by the user,
>>> but rather be provided by e.g. dunecontrol.
>>>
>>>        
>>>> Further, the macors HEADERCHECK and ADD_DUNE_EXECUTABLE in
>>>> DuneUtils.cmake are never called (ADD_DUNE_EXECUTABLE wouldn't work
>>>> because it depends on cmake/regen_config_header.sh).
>>>>          
>>> DuneUtils.cmake is a collection of macros that could be useful, although
>>> some of them may not be used in my example. I have used HEADERCHECK and
>>> it works.
>>> ADD_DUNE_EXECUTABLE is a leftover which I will remove, you should use
>>> ADD_EXECUTABLE instead. If you have further suggestions, just write me.
>>>
>>> Greetings,
>>>
>>> Felix
>>>
>>> -- 
>>> -----------------------------------------------------------
>>>    Felix Albrecht                     Tel.: +49 251 83 35130
>>>    Institut fuer Numerische und       Fax:  +49 251 83 32729
>>>    Angewandte Mathematik
>>>    FB Mathematik und Informatik
>>>    Universitaet Muenster
>>>    Orleans-Ring 10                    Room: 212
>>>    D-48149 Muenster
>>>    Mail: felix.albrecht at uni-muenster.de
>>>    WWW:  http://www.uni-muenster.de/math/u/felix.albrecht/
>>> -----------------------------------------------------------
>>>
>>>
>>> _______________________________________________
>>> Dune mailing list
>>> Dune at dune-project.org
>>> http://lists.dune-project.org/mailman/listinfo/dune
>>>        
>>
>>      
>
>    





More information about the Dune mailing list