Merge pull request #319 from rolk/319_confvar

Trim unnecessary config.h defines from prerequisite list
This commit is contained in:
Bård Skaflestad 2013-08-17 05:37:35 -07:00
commit ed3552cfb5
10 changed files with 14 additions and 27 deletions

View File

@ -46,6 +46,9 @@ include (CMakeLists_files.cmake)
macro (config_hook)
# opm_need_version_of ("dune-common")
list (APPEND ${project}_CONFIG_IMPL_VARS
HAVE_DUNE_ISTL
)
endmacro (config_hook)
macro (prereqs_hook)

View File

@ -145,11 +145,16 @@ list (APPEND ${project}_CONFIG_VARS ${${project}_CONFIG_VAR})
# write configuration variables to this file. note that it is a temporary.
# _CONFIG_IMPL_VARS are defines that are only written to config.h internal
# to this project; they are not exported to any installed files.
# TESTING_CONFIG_VARS is what's required by the unit tests, and is therefore
# added in an ad-hoc manner to avoid putting dependencies to it in the module
# requirement file. (it should be added if there is .h code that needs it)
message (STATUS "Writing config file \"${PROJECT_BINARY_DIR}/config.h\"...")
set (CONFIG_H "${PROJECT_BINARY_DIR}/config.h.tmp")
configure_vars (
FILE CXX ${CONFIG_H}
WRITE ${${project}_CONFIG_VARS} ${${project}_CONFIG_IMPL_VARS}
WRITE ${${project}_CONFIG_VARS}
${${project}_CONFIG_IMPL_VARS}
${TESTING_CONFIG_VARS}
)
# call this hook to let it setup necessary conditions for Fortran support

View File

@ -31,3 +31,6 @@ endif (${Boost_UNIT_TEST_FRAMEWORK_FOUND})
set (HAVE_DYNAMIC_BOOST_TEST "${HAVE_DYNAMIC_BOOST_TEST}"
CACHE BOOL "Whether Boost::Test is dynamically linked or not"
)
# include in config.h
list (APPEND TESTING_CONFIG_VARS "HAVE_DYNAMIC_BOOST_TEST")

View File

@ -3,7 +3,6 @@
# defines that must be present in config.h for our headers
set (dune-cornerpoint_CONFIG_VAR
HAVE_DYNAMIC_BOOST_TEST
DUNE_GRID_VERSION_MAJOR
DUNE_GRID_VERSION_MINOR
DUNE_GRID_VERSION_REVISION

View File

@ -3,7 +3,6 @@
# defines that must be present in config.h for our headers
set (opm-autodiff_CONFIG_VAR
HAVE_DYNAMIC_BOOST_TEST
)
# dependencies

View File

@ -3,12 +3,8 @@
# defines that must be present in config.h for our headers
set (opm-core_CONFIG_VAR
HAVE_DUNE_ISTL
HAVE_DYNAMIC_BOOST_TEST
HAVE_ERT
HAVE_SUITESPARSE_UMFPACK_H
HAVE_NULLPTR
HAVE_STATIC_ASSERT
)
# dependencies

View File

@ -3,20 +3,8 @@
# 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
HAVE_MPI
HAVE_VALGRIND
)
# dependencies

View File

@ -3,8 +3,6 @@
# defines that must be present in config.h for our headers
set (opm-polymer_CONFIG_VAR
HAVE_DYNAMIC_BOOST_TEST
HAVE_ERT
)
# dependencies

View File

@ -3,8 +3,6 @@
# defines that must be present in config.h for our headers
set (opm-porsol_CONFIG_VAR
HAVE_DYNAMIC_BOOST_TEST
HAVE_VALGRIND
)
# dependencies

View File

@ -3,8 +3,6 @@
# defines that must be present in config.h for our headers
set (opm-upscaling_CONFIG_VAR
HAVE_DYNAMIC_BOOST_TEST
HAVE_LAPACK
HAVE_SUPERLU
)