Upgrade Findopm-material to use separate prerequisite list

This will now be included both by the find module and by the project
file itself.
This commit is contained in:
Roland Kaufmann 2013-08-07 23:38:06 +02:00
parent 6e38909b49
commit c1acffcd90
2 changed files with 36 additions and 6 deletions

View File

@ -11,15 +11,15 @@
# This code is licensed under The GNU General Public License v3.0 # This code is licensed under The GNU General Public License v3.0
# use the generic find routine # use the generic find routine
include (opm-material-prereqs)
include (OpmPackage) include (OpmPackage)
find_opm_package ( find_opm_package (
# module name # module name
"opm-material" "opm-material"
# dependencies # dependencies
"C99; "${opm-material_DEPS}"
CXX11Features
"
# header to search for # header to search for
"opm/material/constants.hh" "opm/material/constants.hh"
@ -37,8 +37,7 @@ int main (void) {
} }
" "
# config variables # config variables
"HAVE_MPI; "${opm-material_CONFIG_VAR}"
HAVE_VALGRIND )
")
include (UseDynamicBoost) include (UseDynamicBoost)
#debug_find_vars ("opm-material") #debug_find_vars ("opm-material")

View 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"
)