mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Updated to require opm-parser. Identical to opm-core PR:433
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
#
|
||||
# If found, it sets these variables:
|
||||
#
|
||||
# HAVE_OPM_PARSER Defined if a test program compiled
|
||||
# OPM_PARSER_INCLUDE_DIRS Header file directories
|
||||
# OPM_PARSER_LIBRARIES Archives and shared objects
|
||||
# HAVE_OPM_PARSER Defined if a test program compiled
|
||||
# OPM_PARSER_INCLUDE_DIRS Header file directories
|
||||
# OPM_PARSER_LIBRARIES Archives and shared objects
|
||||
|
||||
include (FindPackageHandleStandardArgs)
|
||||
|
||||
@@ -61,18 +61,18 @@ find_path (OPM_PARSER_INCLUDE_DIR
|
||||
# then it is probably a build directory; read the CMake cache of
|
||||
# opm-parser to figure out where the source directory is
|
||||
if ((NOT OPM_PARSER_INCLUDE_DIR) AND
|
||||
(OPM_PARSER_ROOT AND (EXISTS "${OPM_PARSER_ROOT}/CMakeCache.txt")))
|
||||
(OPM_PARSER_ROOT AND (EXISTS "${OPM_PARSER_ROOT}/CMakeCache.txt")))
|
||||
set (_regex "^OPMParser_SOURCE_DIR:STATIC=\(.*\)$")
|
||||
file (STRINGS
|
||||
"${OPM_PARSER_ROOT}/CMakeCache.txt"
|
||||
_cache_entry
|
||||
REGEX "${_regex}")
|
||||
"${OPM_PARSER_ROOT}/CMakeCache.txt"
|
||||
_cache_entry
|
||||
REGEX "${_regex}")
|
||||
string(REGEX REPLACE "${_regex}" "\\1"
|
||||
OPM_PARSER_INCLUDE_DIR
|
||||
"${_cache_entry}")
|
||||
OPM_PARSER_INCLUDE_DIR
|
||||
"${_cache_entry}")
|
||||
if (OPM_PARSER_INCLUDE_DIR)
|
||||
set (OPM_PARSER_INCLUDE_DIR "${OPM_PARSER_INCLUDE_DIR}"
|
||||
CACHE PATH "Path to OPM parser header files" FORCE)
|
||||
set (OPM_PARSER_INCLUDE_DIR "${OPM_PARSER_INCLUDE_DIR}"
|
||||
CACHE PATH "Path to OPM parser header files" FORCE)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -109,14 +109,16 @@ endif ()
|
||||
# get the prerequisite Boost libraries
|
||||
if (NOT Boost_FOUND)
|
||||
find_package(Boost 1.44.0
|
||||
COMPONENTS filesystem date_time system unit_test_framework REQUIRED ${OPM_PARSER_QUIET})
|
||||
COMPONENTS filesystem date_time system unit_test_framework REQUIRED ${OPM_PARSER_QUIET})
|
||||
endif ()
|
||||
|
||||
# setup list of all required libraries to link with opm-parser. notice that
|
||||
# we use the plural form to get *all* the libraries needed by cjson
|
||||
set (OPM_PARSER_INCLUDE_DIRS
|
||||
${OPM_PARSER_INCLUDE_DIR}
|
||||
${CJSON_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS})
|
||||
|
||||
set (OPM_PARSER_LIBRARIES
|
||||
${OPM_PARSER_LIBRARY}
|
||||
${OPM_JSON_LIBRARY}
|
||||
@@ -126,7 +128,7 @@ set (OPM_PARSER_LIBRARIES
|
||||
# see if we can compile a minimum example
|
||||
# CMake logical test doesn't handle lists (sic)
|
||||
if (NOT (OPM_PARSER_INCLUDE_DIR MATCHES "-NOTFOUND"
|
||||
OR OPM_PARSER_LIBRARIES MATCHES "-NOTFOUND"))
|
||||
OR OPM_PARSER_LIBRARIES MATCHES "-NOTFOUND"))
|
||||
include (CMakePushCheckState)
|
||||
include (CheckCSourceCompiles)
|
||||
cmake_push_check_state ()
|
||||
@@ -135,7 +137,7 @@ if (NOT (OPM_PARSER_INCLUDE_DIR MATCHES "-NOTFOUND"
|
||||
|
||||
check_cxx_source_compiles (
|
||||
"#include <cstdlib>
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
|
||||
int main (void) {
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
|
||||
# defines that must be present in config.h for our headers
|
||||
set (opm-autodiff_CONFIG_VAR
|
||||
)
|
||||
)
|
||||
|
||||
# dependencies
|
||||
set (opm-autodiff_DEPS
|
||||
# Compile with C99 support if available
|
||||
"C99"
|
||||
# Compile with C++0x/11 support if available
|
||||
"CXX11Features"
|
||||
# Various runtime library enhancements
|
||||
"Boost 1.39.0
|
||||
COMPONENTS date_time filesystem system unit_test_framework REQUIRED"
|
||||
# DUNE prerequisites
|
||||
"dune-common REQUIRED;
|
||||
dune-istl REQUIRED;
|
||||
opm-core REQUIRED"
|
||||
# Eigen
|
||||
"Eigen3 3.1 REQUIRED"
|
||||
)
|
||||
# Compile with C99 support if available
|
||||
"C99"
|
||||
# Compile with C++0x/11 support if available
|
||||
"CXX11Features"
|
||||
# Various runtime library enhancements
|
||||
"Boost 1.44.0
|
||||
COMPONENTS date_time filesystem system unit_test_framework REQUIRED"
|
||||
# DUNE prerequisites
|
||||
"dune-common REQUIRED;
|
||||
dune-istl REQUIRED;
|
||||
opm-core REQUIRED"
|
||||
# Eigen
|
||||
"Eigen3 3.1 REQUIRED"
|
||||
)
|
||||
|
||||
@@ -3,31 +3,33 @@
|
||||
|
||||
# defines that must be present in config.h for our headers
|
||||
set (opm-core_CONFIG_VAR
|
||||
HAVE_ERT
|
||||
HAVE_SUITESPARSE_UMFPACK_H
|
||||
)
|
||||
HAVE_ERT
|
||||
HAVE_SUITESPARSE_UMFPACK_H
|
||||
)
|
||||
|
||||
# dependencies
|
||||
set (opm-core_DEPS
|
||||
# compile with C99 support if available
|
||||
"C99"
|
||||
# compile with C++0x/11 support if available
|
||||
"CXX11Features REQUIRED"
|
||||
# various runtime library enhancements
|
||||
"Boost 1.39.0
|
||||
COMPONENTS date_time filesystem system unit_test_framework REQUIRED"
|
||||
# matrix library
|
||||
"BLAS REQUIRED"
|
||||
"LAPACK REQUIRED"
|
||||
# Tim Davis' SuiteSparse archive
|
||||
"SuiteSparse COMPONENTS umfpack"
|
||||
# solver
|
||||
"SuperLU"
|
||||
# xml processing (for config parsing)
|
||||
"TinyXML"
|
||||
# Ensembles-based Reservoir Tools (ERT)
|
||||
"ERT"
|
||||
# DUNE dependency
|
||||
"dune-common"
|
||||
"dune-istl"
|
||||
)
|
||||
# compile with C99 support if available
|
||||
"C99"
|
||||
# compile with C++0x/11 support if available
|
||||
"CXX11Features REQUIRED"
|
||||
# various runtime library enhancements
|
||||
"Boost 1.44.0
|
||||
COMPONENTS date_time filesystem system unit_test_framework REQUIRED"
|
||||
# matrix library
|
||||
"BLAS REQUIRED"
|
||||
"LAPACK REQUIRED"
|
||||
# Tim Davis' SuiteSparse archive
|
||||
"SuiteSparse COMPONENTS umfpack"
|
||||
# solver
|
||||
"SuperLU"
|
||||
# xml processing (for config parsing)
|
||||
"TinyXML"
|
||||
#Parser library
|
||||
"opm-parser REQUIRED"
|
||||
# Ensembles-based Reservoir Tools (ERT)
|
||||
"ERT"
|
||||
# DUNE dependency
|
||||
"dune-common"
|
||||
"dune-istl"
|
||||
)
|
||||
|
||||
@@ -13,6 +13,6 @@ set (opm-parser_DEPS
|
||||
# compile with C++0x/11 support if available
|
||||
"CXX11Features REQUIRED"
|
||||
# various runtime library enhancements
|
||||
"Boost 1.39.0
|
||||
COMPONENTS date_time filesystem system unit_test_framework REQUIRED"
|
||||
"Boost 1.44.0 COMPONENTS date_time filesystem system unit_test_framework REQUIRED"
|
||||
"cJSON"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user