[Dune] cmake docu ?

Benedikt Oswald benedikt.oswald at lspr.ch
Fri Nov 21 15:31:01 CET 2014


Hello Christoph,

I build on Mac OS X currently, where cmake quite persistently chooses
the Apple clang compilers
as c an c++ compilers but then chooses the mpicxx, that I installed. It
results in something like:

================================
[ 25%] Building CXX object
lib/CMakeFiles/dunegrid.dir/__/dune/grid/io/file/dgfparser/dgfug.cc.o
[ 25%] Building CXX object
lib/CMakeFiles/dunegrid.dir/__/dune/grid/io/file/dgfparser/blocks/basic.cc.o
[ 25%] Building CXX object
lib/CMakeFiles/dunegrid.dir/__/dune/grid/io/file/dgfparser/blocks/boundarydom.cc.o
[ 37%] Building CXX object
lib/CMakeFiles/dunegrid.dir/__/dune/grid/io/file/dgfparser/blocks/boundaryseg.cc.o
[ 37%] Building CXX object
lib/CMakeFiles/dunegrid.dir/__/dune/grid/io/file/dgfparser/blocks/cube.cc.o
[ 37%] Building CXX object
lib/CMakeFiles/dunegrid.dir/__/dune/grid/io/file/dgfparser/blocks/dim.cc.o
[ 50%] Building CXX object
lib/CMakeFiles/dunegrid.dir/__/dune/grid/io/file/dgfparser/blocks/general.cc.o
[ 50%] Building CXX object
lib/CMakeFiles/dunegrid.dir/__/dune/grid/io/file/dgfparser/blocks/gridparameter.cc.o
[ 50%] Building CXX object
lib/CMakeFiles/dunegrid.dir/__/dune/grid/io/file/dgfparser/blocks/interval.cc.o
[ 62%] Building CXX object
lib/CMakeFiles/dunegrid.dir/__/dune/grid/io/file/dgfparser/blocks/periodicfacetrans.cc.o
[ 62%] Building CXX object
lib/CMakeFiles/dunegrid.dir/__/dune/grid/io/file/dgfparser/blocks/projection.cc.o
[ 62%] Building CXX object
lib/CMakeFiles/dunegrid.dir/__/dune/grid/io/file/dgfparser/blocks/simplex.cc.o
[ 75%] Building CXX object
lib/CMakeFiles/dunegrid.dir/__/dune/grid/io/file/dgfparser/blocks/simplexgeneration.cc.o
[ 75%] Building CXX object
lib/CMakeFiles/dunegrid.dir/__/dune/grid/io/file/dgfparser/blocks/vertex.cc.o
[ 87%] Building CXX object
lib/CMakeFiles/dunegrid.dir/__/dune/grid/alugrid/2d/intersection.cc.o
In file included from
/Users/oswald/gitwork/nanofactory/vulcain-pure-dune/dune-grid/dune/grid/alugrid/2d/intersection.cc:10:
In file included from
/Users/oswald/gitwork/nanofactory/vulcain-pure-dune/dune-grid/dune/grid/alugrid/2d/geometry.hh:7:
/Users/oswald/gitwork/nanofactory/vulcain-pure-dune/dune-grid/dune/grid/common/grid.hh:360:104:
error: no type named 'vector' in namespace 'std'
  template< class GridImp, class IndexSetImp, class IndexTypeImp =
unsigned int, class TypesImp = std::vector< GeometryType > > class IndexSet;
                                                                                                 
~~~~~^
/Users/oswald/gitwork/nanofactory/vulcain-pure-dune/dune-grid/dune/grid/common/grid.hh:360:110:
error: expected ',' or '>' in template-parameter-list
  template< class GridImp, class IndexSetImp, class IndexTypeImp =
unsigned int, class TypesImp = std::vector< GeometryType > > class IndexSet;
                                                                                                            
^
etc.
================================

How would I, in the most elegant and Dune conforming way specify the
compilers I need ?

something like:

#               
-DCMAKE_C_COMPILER=/Users/oswald/extlib/openmpi/1.6.5/gcc/4.8.1/bin/mpicc
#               
-DCMAKE_CXX_COMPILER=/Users/oswald/extlib/openmpi/1.6.5/gcc/4.8.1/bin/mpicxx

---------
my platform:

odysseus:vulcain-pure-dune oswald$ uname -a
Darwin odysseus.local 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17
19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64

odysseus:vulcain-pure-dune oswald$ mpicxx -v
Using built-in specs.
COLLECT_GCC=/Users/oswald/extlib/gcc/4.8.1/gcc/4.8.1/bin/g++
COLLECT_LTO_WRAPPER=/Users/oswald/extlib/gcc/4.8.1/gcc/4.8.1/libexec/gcc/x86_64-apple-darwin12.4.0/4.8.1/lto-wrapper
Target: x86_64-apple-darwin12.4.0
Configured with: ../gcc-4.8.1/configure
--prefix=/Users/oswald/extlib/gcc/4.8.1/gcc/4.8.1
--with-gmp=/Users/oswald/extlib/gmp/5.1.2/gcc/4.8.1
--with-mpfr=/Users/oswald/extlib/mpfr/3.1.2/gcc/4.8.1
--with-mpc=/Users/oswald/extlib/mpc/1.0.1/gcc/4.8.1
--with-isl=/Users/oswald/extlib/isl/0.11.1/gcc/4.8.1
--with-cloog=/Users/oswald/extlib/cloog/0.18.0/gcc/4.8.1
Thread model: posix
gcc version 4.8.1 (GCC)

odysseus:vulcain-pure-dune oswald$ mpif77 -v
Using built-in specs.
COLLECT_GCC=/Users/oswald/extlib/gcc/4.8.1/gcc/4.8.1/bin/gfortran
COLLECT_LTO_WRAPPER=/Users/oswald/extlib/gcc/4.8.1/gcc/4.8.1/libexec/gcc/x86_64-apple-darwin12.4.0/4.8.1/lto-wrapper
Target: x86_64-apple-darwin12.4.0
Configured with: ../gcc-4.8.1/configure
--prefix=/Users/oswald/extlib/gcc/4.8.1/gcc/4.8.1
--with-gmp=/Users/oswald/extlib/gmp/5.1.2/gcc/4.8.1
--with-mpfr=/Users/oswald/extlib/mpfr/3.1.2/gcc/4.8.1
--with-mpc=/Users/oswald/extlib/mpc/1.0.1/gcc/4.8.1
--with-isl=/Users/oswald/extlib/isl/0.11.1/gcc/4.8.1
--with-cloog=/Users/oswald/extlib/cloog/0.18.0/gcc/4.8.1
Thread model: posix
gcc version 4.8.1 (GCC)

odysseus:vulcain-pure-dune oswald$ mpicc -v
Using built-in specs.
COLLECT_GCC=/Users/oswald/extlib/gcc/4.8.1/gcc/4.8.1/bin/gcc
COLLECT_LTO_WRAPPER=/Users/oswald/extlib/gcc/4.8.1/gcc/4.8.1/libexec/gcc/x86_64-apple-darwin12.4.0/4.8.1/lto-wrapper
Target: x86_64-apple-darwin12.4.0
Configured with: ../gcc-4.8.1/configure
--prefix=/Users/oswald/extlib/gcc/4.8.1/gcc/4.8.1
--with-gmp=/Users/oswald/extlib/gmp/5.1.2/gcc/4.8.1
--with-mpfr=/Users/oswald/extlib/mpfr/3.1.2/gcc/4.8.1
--with-mpc=/Users/oswald/extlib/mpc/1.0.1/gcc/4.8.1
--with-isl=/Users/oswald/extlib/isl/0.11.1/gcc/4.8.1
--with-cloog=/Users/oswald/extlib/cloog/0.18.0/gcc/4.8.1
Thread model: posix
gcc version 4.8.1 (GCC)



Thanks & greetings, Benedikt



Am 21/11/14 um 15:18 schrieb Carsten Gräser:
> Hi Christoph,
>
> Am 21.11.2014 um 13:00 schrieb Christoph Grüninger:> Hi Benedikt,
>> you struck a nerve, the documentation fell behind compared to the
>> implementation. I try to keep everything in one place:
>>
> http://users.dune-project.org/projects/main-wiki/wiki/Using_cmake_to_build_your_DUNE_project
>> Everybody is welcome to improve the Wiki page. I'll add new topics when
>> they come up or are requested.
> one of the questions that we should answer is on build types:
>
> Since passing custom compiler arguments to 'make' is discouraged
> because it is 'not the cmake way' we should explain how to
> setup different build types as a replacement.
>
> Obviously you can have several option files with different
> options and build directories. But I don't know if this is
> the desired way.
>
> Best,
> Carsten
>
>
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune

-- 
------------------------------------------------------------------------------------------------
Dr. sc. techn. Benedikt Oswald - first engineer - LSPR AG - phone - +41 43 366 90 74
Technoparkstrasse 1, CH-8005 Zürich, benedikt.oswald at lspr.ch - labor vincit omnia improbus
------------------------------------------------------------------------------------------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 882 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20141121/315b2a61/attachment.sig>


More information about the Dune mailing list