From 37ab6ef8a0f87502cd24b96afdd6a94bc0f8716c Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Wed, 30 Jul 2014 11:46:33 +0200 Subject: [PATCH] add support for the new DUNE-ALUGrid module this is basically the dune-grid grid manager for ALUGrid properly out-sourced into an own module. (it does not require an external library anymore, so it simplifies the build quite a bit.) Also, the DUNE-ALUGrid module has quite a few new features and performance improvements compared to the old code from dune-grid. For details, see http://users.dune-project.org/projects/dune-alugrid --- cmake/Modules/Finddune-alugrid.cmake | 52 ++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 cmake/Modules/Finddune-alugrid.cmake diff --git a/cmake/Modules/Finddune-alugrid.cmake b/cmake/Modules/Finddune-alugrid.cmake new file mode 100644 index 000000000..db2d4c906 --- /dev/null +++ b/cmake/Modules/Finddune-alugrid.cmake @@ -0,0 +1,52 @@ +# - Find DUNE ALUgrid library +# +# Defines the following variables: +# dune-alugrid_INCLUDE_DIRS Directory of header files +# dune-alugrid_LIBRARIES Directory of shared object files +# dune-alugrid_DEFINITIONS Defines that must be set to compile +# dune-alugrid_CONFIG_VARS List of defines that should be in config.h +# HAVE_DUNE_ALUGRID Binary value to use in config.h + +# Copyright (C) 2013 Uni Research AS +# This code is licensed under The GNU General Public License v3.0 + +include (OpmPackage) +find_opm_package ( + # module name + "dune-alugrid" + + # dependencies + # TODO: we should probe for all the HAVE_* values listed below; + # however, we don't actually use them in our implementation, so + # we just include them to forward here in case anyone else does + "CXX11Features REQUIRED; + dune-grid REQUIRED; + ZLIB REQUIRED; + METIS + " + # header to search for + "dune/alugrid/grid.hh" + + # library to search for + "dunealugrid;alugrid_2d;alugrid_parallel;alugrid_serial" + + # defines to be added to compilations + "" + + # test program +"#include +int main (void) { + Dune::ALUGrid grid; + grid.leafGridView().size(/*codim=*/0); + return 0; +} +" + # config variables + "HAVE_DUNE_ALUGRID + ") + +#debug_find_vars ("dune-grid") + +# make version number available in config.h +include (UseDuneVer) +find_dune_version ("dune" "alugrid")