Merge pull request #311 from rolk/311_material
Find module for opm-material
This commit is contained in:
commit
07dcca3917
43
cmake/Modules/Findopm-material.cmake
Normal file
43
cmake/Modules/Findopm-material.cmake
Normal file
@ -0,0 +1,43 @@
|
||||
# - Find OPM materials library
|
||||
#
|
||||
# Defines the following variables:
|
||||
# opm-material_INCLUDE_DIRS Directory of header files
|
||||
# opm-material_LIBRARIES Directory of shared object files
|
||||
# opm-material_DEFINITIONS Defines that must be set to compile
|
||||
# opm-material_CONFIG_VARS List of defines that should be in config.h
|
||||
# HAVE_OPM_MATERIAL 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
|
||||
|
||||
# use the generic find routine
|
||||
include (opm-material-prereqs)
|
||||
include (OpmPackage)
|
||||
find_opm_package (
|
||||
# module name
|
||||
"opm-material"
|
||||
|
||||
# dependencies
|
||||
"${opm-material_DEPS}"
|
||||
|
||||
# header to search for
|
||||
"opm/material/constants.hh"
|
||||
|
||||
# library to search for
|
||||
""
|
||||
|
||||
# defines to be added to compilations
|
||||
""
|
||||
|
||||
# test program
|
||||
"#include <opm/material/constants.hh>
|
||||
int main (void) {
|
||||
double c = Opm::Constants<double>::c;
|
||||
return 0;
|
||||
}
|
||||
"
|
||||
# config variables
|
||||
"${opm-material_CONFIG_VAR}"
|
||||
)
|
||||
include (UseDynamicBoost)
|
||||
#debug_find_vars ("opm-material")
|
31
cmake/Modules/opm-material-prereqs.cmake
Normal file
31
cmake/Modules/opm-material-prereqs.cmake
Normal file
@ -0,0 +1,31 @@
|
||||
# -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t; compile-command: "cmake -Wdev" -*-
|
||||
# vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap:
|
||||
|
||||
# defines that must be present in config.h for our headers
|
||||
set (opm-material_CONFIG_VAR
|
||||
HAVE_NULLPTR
|
||||
HAVE_ARRAY
|
||||
HAVE_ATTRIBUTE_ALWAYS_INLINE
|
||||
HAS_ATTRIBUTE_UNUSED
|
||||
HAS_ATTRIBUTE_DEPRECATED
|
||||
HAS_ATTRIBUTE_DEPRECATED_MSG
|
||||
HAVE_CONSTEXPR
|
||||
HAVE_INTEGRAL_CONSTANT
|
||||
HAVE_STATIC_ASSERT
|
||||
HAVE_VARIADIC_TEMPLATES
|
||||
HAVE_VARIADIC_CONSTRUCTOR_SFINAE
|
||||
HAVE_RVALUE_REFERENCES
|
||||
HAVE_TUPLE
|
||||
HAVE_TR1_TUPLE
|
||||
)
|
||||
|
||||
# dependencies
|
||||
set (opm-material_DEPS
|
||||
# compile with C99 support if available
|
||||
"C99"
|
||||
# compile with C++0x/11 support if available
|
||||
"CXX11Features REQUIRED"
|
||||
# DUNE dependency
|
||||
"dune-common"
|
||||
"dune-istl"
|
||||
)
|
Loading…
Reference in New Issue
Block a user