Find modules for dune-geometry and dune-grid

This commit is contained in:
Roland Kaufmann
2013-02-22 11:51:09 +01:00
parent d9980beef1
commit 03ccc506bd
2 changed files with 105 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
# - Find DUNE geometry library
#
# Defines the following variables:
# dune-geometry_INCLUDE_DIRS Directory of header files
# dune-geometry_LIBRARIES Directory of shared object files
# dune-geometry_DEFINITIONS Defines that must be set to compile
# dune-geometry_CONFIG_VARS List of defines that should be in config.h
# HAVE_DUNE_GEOMETRY 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-geometry"
# 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-common REQUIRED
"
# header to search for
"dune/geometry/quadraturerules.hh"
# library to search for
"dunegeometry"
# defines to be added to compilations
""
# test program
"#include <dune/geometry/quadraturerules.hh>
int main (void) {
Dune::GeometryType gt;
gt.makeQuadrilateral();
Dune::QuadratureRules<double, 2>::rule(gt, 2).size();
return 0;
}
"
# config variables
"HAVE_ALGLIB
")
#debug_find_vars ("dune-geometry")

View File

@@ -0,0 +1,58 @@
# - Find DUNE grid library
#
# Defines the following variables:
# dune-grid_INCLUDE_DIRS Directory of header files
# dune-grid_LIBRARIES Directory of shared object files
# dune-grid_DEFINITIONS Defines that must be set to compile
# dune-grid_CONFIG_VARS List of defines that should be in config.h
# HAVE_DUNE_GRID 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-grid"
# 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-common REQUIRED;
dune-geometry REQUIRED
"
# header to search for
"dune/grid/onedgrid.hh"
# library to search for
"dunegrid"
# defines to be added to compilations
""
# test program
"#include <dune/grid/onedgrid.hh>
#include <vector>
int main (void) {
std::vector<Dune::OneDGrid::ctype> coords;
Dune::OneDGrid grid(coords);
return grid.lbegin<0>(0) == grid.lend<0>(0);
return 0;
}
"
# config variables
"HAVE_MPI;
HAVE_UG;
HAVE_DUNE_FEM;
HAVE_ALUGRID;
HAVE_GRIDTYPE;
HAVE_GRAPE;
HAVE_PSURFACE;
HAVE_AMIRAMESH;
HAVE_ALBERTA;
HAVE_STDINT_H
")
#debug_find_vars ("dune-grid")