#677 gridtype.hh documentation is wrong
Metadata
Property | Value |
---|---|
Reported by | Jö Fahlke (jorrit@jorrit.de) |
Reported at | Dec 1, 2009 20:42 |
Type | Bug Report |
Version | Git (pre2.4) [autotools] |
Operating System | Unspecified / All |
Last edited by | Andreas Dedner (A.S.Dedner@warwick.ac.uk) |
Last edited at | Dec 7, 2009 12:29 |
Closed by | Andreas Dedner (A.S.Dedner@warwick.ac.uk) |
Closed at | Dec 7, 2009 12:29 |
Closed in version | Unknown |
Resolution | Implemented |
Comment | rev 6044 always includes the CPPFLAGS as suggested and the default is removed |
Description
dune/grid/utility/griddtype.hh says that the way to choose the grid type at make time is
make GRIDDIM=3 GRIDTYPE=ALBERTAGRID myprogram
(OK, I tested with GRIDDIM=2 GRIDTYPE=ALUGRID_SIMPLEX, but the same principle applies...) However, this does not seem to work, at least not when compiling dune/grid/io/file/dgfparser/test/tester. What does work however is
make CPPFLAGS="-DGRIDDIM=2 -DALUGRID_SIMPLEX" myprogram
(note that GRIDTYPE is not defined in this case). There seem to be two issues here:
(1) The variables must be passed as preprocessor defines and not as make variables. This could be an error in some Makefile.am (2) GRIDTYPE is not used and does not appear in the actual code in gridtype.hh. Instead, the code checks whether ALBERTAGRID, ALUGRID_CUBE, ALUGRID_SIMPLEX, etc. are defined and defined the GridType typedef accordingly.