Merge remote-tracking branch 'upstream/release/2013.03' into combined
This commit is contained in:
commit
5fba4ca2b3
@ -36,7 +36,7 @@ set (${project}_DEPS
|
|||||||
# Tim Davis' SuiteSparse archive
|
# Tim Davis' SuiteSparse archive
|
||||||
"SuiteSparse COMPONENTS umfpack"
|
"SuiteSparse COMPONENTS umfpack"
|
||||||
# solver
|
# solver
|
||||||
"SUPERLU"
|
"SuperLU"
|
||||||
# xml processing (for config parsing)
|
# xml processing (for config parsing)
|
||||||
"TinyXML"
|
"TinyXML"
|
||||||
# Ensembles-based Reservoir Tools (ERT)
|
# Ensembles-based Reservoir Tools (ERT)
|
||||||
@ -97,8 +97,13 @@ include (UseOptimization)
|
|||||||
# dependencies, in case they alter the list of warnings
|
# dependencies, in case they alter the list of warnings
|
||||||
include (UseWarnings)
|
include (UseWarnings)
|
||||||
|
|
||||||
|
# parallel computing must be explicitly enabled
|
||||||
|
option (USE_MPI "Use Message Passing Interface for parallel computing" OFF)
|
||||||
|
if (NOT USE_MPI)
|
||||||
|
set (CMAKE_DISABLE_FIND_PACKAGE_MPI TRUE)
|
||||||
|
endif (NOT USE_MPI)
|
||||||
|
|
||||||
### --- begin opm-core specific --- ###
|
### --- begin opm-core specific --- ###
|
||||||
# parallel programming
|
|
||||||
include (UseOpenMP)
|
include (UseOpenMP)
|
||||||
find_openmp (${project})
|
find_openmp (${project})
|
||||||
### --- end opm-core specific --- ###
|
### --- end opm-core specific --- ###
|
||||||
|
@ -22,23 +22,17 @@ endmacro (remove_duplicate_libraries module)
|
|||||||
|
|
||||||
# headers can be trimmed from the end, since adding a directory to
|
# headers can be trimmed from the end, since adding a directory to
|
||||||
# the list is an idempotent action
|
# the list is an idempotent action
|
||||||
macro (remove_duplicate_headers module)
|
macro (remove_duplicate_var module suffix)
|
||||||
if (DEFINED ${module}_INCLUDE_DIRS)
|
if (DEFINED ${module}_${suffix})
|
||||||
list (REMOVE_DUPLICATES ${module}_INCLUDE_DIRS)
|
list (REMOVE_DUPLICATES ${module}_${suffix})
|
||||||
endif (DEFINED ${module}_INCLUDE_DIRS)
|
endif (DEFINED ${module}_${suffix})
|
||||||
endmacro (remove_duplicate_headers module)
|
endmacro (remove_duplicate_var module suffix)
|
||||||
|
|
||||||
# linker flags may not be specified at all
|
|
||||||
macro (remove_duplicate_flags module)
|
|
||||||
if (DEFINED ${module}_LINKER_FLAGS)
|
|
||||||
list (REMOVE_DUPLICATES ${module}_LINKER_FLAGS)
|
|
||||||
endif (DEFINED ${module}_LINKER_FLAGS)
|
|
||||||
endmacro (remove_duplicate_flags module)
|
|
||||||
|
|
||||||
# fix up both headers and libraries, in case two dependencies have
|
# fix up both headers and libraries, in case two dependencies have
|
||||||
# included the same second-level library independently
|
# included the same second-level library independently
|
||||||
macro (remove_dup_deps module)
|
macro (remove_dup_deps module)
|
||||||
remove_duplicate_headers (${module})
|
remove_duplicate_var (${module} INCLUDE_DIRS)
|
||||||
|
remove_duplicate_var (${module} LINKER_FLAGS)
|
||||||
|
remove_duplicate_var (${module} CONFIG_VARS)
|
||||||
remove_duplicate_libraries (${module})
|
remove_duplicate_libraries (${module})
|
||||||
remove_duplicate_flags (${module})
|
|
||||||
endmacro (remove_dup_deps module)
|
endmacro (remove_dup_deps module)
|
||||||
|
@ -18,7 +18,8 @@ find_opm_package (
|
|||||||
# dependencies
|
# dependencies
|
||||||
"CXX11Features REQUIRED;
|
"CXX11Features REQUIRED;
|
||||||
BLAS REQUIRED;
|
BLAS REQUIRED;
|
||||||
LAPACK REQUIRED
|
LAPACK REQUIRED;
|
||||||
|
MPI
|
||||||
"
|
"
|
||||||
# header to search for
|
# header to search for
|
||||||
"dune/common/fvector.hh"
|
"dune/common/fvector.hh"
|
||||||
|
@ -24,7 +24,7 @@ find_opm_package (
|
|||||||
|
|
||||||
# required dependencies
|
# required dependencies
|
||||||
"dune-common ${_require_dune_common};
|
"dune-common ${_require_dune_common};
|
||||||
SUPERLU
|
SuperLU
|
||||||
"
|
"
|
||||||
# header to search for
|
# header to search for
|
||||||
"dune/istl/bcrsmatrix.hh"
|
"dune/istl/bcrsmatrix.hh"
|
||||||
|
@ -24,7 +24,7 @@ find_opm_package (
|
|||||||
BLAS REQUIRED;
|
BLAS REQUIRED;
|
||||||
LAPACK REQUIRED;
|
LAPACK REQUIRED;
|
||||||
SuiteSparse COMPONENTS umfpack;
|
SuiteSparse COMPONENTS umfpack;
|
||||||
SUPERLU;
|
SuperLU;
|
||||||
TinyXML;
|
TinyXML;
|
||||||
ERT;
|
ERT;
|
||||||
dune-istl
|
dune-istl
|
||||||
|
@ -51,6 +51,14 @@ foreach (name IN LISTS _opm_proj_vars)
|
|||||||
endif (NOT DEFINED ${CMAKE_PROJECT_NAME}_${name})
|
endif (NOT DEFINED ${CMAKE_PROJECT_NAME}_${name})
|
||||||
endforeach (name)
|
endforeach (name)
|
||||||
|
|
||||||
|
# these dependencies must always be handled by the find module
|
||||||
|
set (_opm_proj_exemptions
|
||||||
|
dune-common
|
||||||
|
dune-istl
|
||||||
|
dune-grid
|
||||||
|
dune-geometry
|
||||||
|
)
|
||||||
|
|
||||||
# insert this boilerplate whenever we are going to find a new package
|
# insert this boilerplate whenever we are going to find a new package
|
||||||
macro (find_and_append_package_to prefix name)
|
macro (find_and_append_package_to prefix name)
|
||||||
# if we have specified a directory, don't revert to searching the
|
# if we have specified a directory, don't revert to searching the
|
||||||
@ -71,6 +79,28 @@ macro (find_and_append_package_to prefix name)
|
|||||||
set (${name}_DIR "${${NAME}_ROOT}")
|
set (${name}_DIR "${${NAME}_ROOT}")
|
||||||
endif (EXISTS ${${NAME}_ROOT}/${name}-config.cmake OR EXISTS ${${NAME}_ROOT}/${name}Config.cmake)
|
endif (EXISTS ${${NAME}_ROOT}/${name}-config.cmake OR EXISTS ${${NAME}_ROOT}/${name}Config.cmake)
|
||||||
endif (NOT DEFINED ${name}_DIR AND (DEFINED ${name}_ROOT OR DEFINED ${NAME}_ROOT))
|
endif (NOT DEFINED ${name}_DIR AND (DEFINED ${name}_ROOT OR DEFINED ${NAME}_ROOT))
|
||||||
|
|
||||||
|
# these libraries need special handling which is not provided in
|
||||||
|
# the -config.cmake file, but which must be provided by this project,
|
||||||
|
# something which is done in our find module
|
||||||
|
list (FIND _opm_proj_exemptions "${name}" _${name}_exempted)
|
||||||
|
if ((NOT (_${name}_exempted EQUAL -1)) AND (DEFINED ${name}_DIR))
|
||||||
|
# most often we are given the name to the build directory and this
|
||||||
|
# is a sub-directory of the source tree
|
||||||
|
if (${name}_DIR MATCHES "build")
|
||||||
|
get_filename_component (${name}_ROOT "${${name}_DIR}" PATH)
|
||||||
|
else (${name}_DIR MATCHES "build")
|
||||||
|
set (${name}_ROOT "${${name}_DIR}")
|
||||||
|
endif (${name}_DIR MATCHES "build")
|
||||||
|
# store this for later, in case we reconfigure
|
||||||
|
set (${name}_ROOT "${${name}_ROOT}" CACHE LOCATION "Path to ${name}")
|
||||||
|
# clear this to not use config mode
|
||||||
|
unset (${name}_DIR)
|
||||||
|
# variables that are given on the command-line is also put in the cache
|
||||||
|
# removing the local copy only "unshadows" this one
|
||||||
|
unset (${name}_DIR CACHE)
|
||||||
|
endif ((NOT (_${name}_exempted EQUAL -1)) AND (DEFINED ${name}_DIR))
|
||||||
|
|
||||||
# using config mode is better than using module (aka. find) mode
|
# using config mode is better than using module (aka. find) mode
|
||||||
# because then the package has already done all its probes and
|
# because then the package has already done all its probes and
|
||||||
# stored them in the config file for us
|
# stored them in the config file for us
|
||||||
@ -81,23 +111,40 @@ macro (find_and_append_package_to prefix name)
|
|||||||
message (STATUS "Finding package ${name} using module mode")
|
message (STATUS "Finding package ${name} using module mode")
|
||||||
find_package (${name} ${ARGN})
|
find_package (${name} ${ARGN})
|
||||||
endif (${name}_DIR)
|
endif (${name}_DIR)
|
||||||
if (${name}_FOUND)
|
|
||||||
|
# the variable "NAME" may be replaced during find_package (as this is
|
||||||
|
# now a macro, and not a function anymore), so we must reinitialize
|
||||||
|
string (TOUPPER "${name}" NAME)
|
||||||
|
string (REPLACE "-" "_" NAME "${NAME}")
|
||||||
|
|
||||||
|
if (${name}_FOUND OR ${NAME}_FOUND)
|
||||||
foreach (var IN LISTS _opm_proj_vars)
|
foreach (var IN LISTS _opm_proj_vars)
|
||||||
if (DEFINED ${name}_${var})
|
if (DEFINED ${name}_${var})
|
||||||
list (APPEND ${prefix}_${var} ${${name}_${var}})
|
list (APPEND ${prefix}_${var} ${${name}_${var}})
|
||||||
# cleanup lists
|
# some packages define an uppercase version of their own name
|
||||||
if ("${var}" STREQUAL "LIBRARIES")
|
elseif (DEFINED ${NAME}_${var})
|
||||||
remove_duplicate_libraries (${prefix})
|
list (APPEND ${prefix}_${var} ${${NAME}_${var}})
|
||||||
else ("${var}" STREQUAL "LIBRARIES")
|
|
||||||
list (REMOVE_DUPLICATES ${prefix}_${var})
|
|
||||||
endif ("${var}" STREQUAL "LIBRARIES")
|
|
||||||
endif (DEFINED ${name}_${var})
|
endif (DEFINED ${name}_${var})
|
||||||
|
# some packages define _PATH instead of _DIRS (Hi, MPI!)
|
||||||
|
if ("${var}" STREQUAL "INCLUDE_DIRS")
|
||||||
|
if (DEFINED ${name}_INCLUDE_PATH)
|
||||||
|
list (APPEND ${prefix}_INCLUDE_DIRS ${${name}_INCLUDE_PATH})
|
||||||
|
elseif (DEFINED ${NAME}_INCLUDE_PATH)
|
||||||
|
list (APPEND ${prefix}_INCLUDE_DIRS ${${NAME}_INCLUDE_PATH})
|
||||||
|
endif (DEFINED ${name}_INCLUDE_PATH)
|
||||||
|
endif ("${var}" STREQUAL "INCLUDE_DIRS")
|
||||||
|
# cleanup lists
|
||||||
|
if ("${var}" STREQUAL "LIBRARIES")
|
||||||
|
remove_duplicate_libraries (${prefix})
|
||||||
|
else ("${var}" STREQUAL "LIBRARIES")
|
||||||
|
remove_duplicate_var (${prefix} ${var})
|
||||||
|
endif ("${var}" STREQUAL "LIBRARIES")
|
||||||
endforeach (var)
|
endforeach (var)
|
||||||
# some libraries only define xxx_FOUND and not a corresponding HAVE_xxx
|
# some libraries only define xxx_FOUND and not a corresponding HAVE_xxx
|
||||||
if (NOT DEFINED HAVE_${NAME})
|
if (NOT DEFINED HAVE_${NAME})
|
||||||
set (HAVE_${NAME} 1)
|
set (HAVE_${NAME} 1)
|
||||||
endif (NOT DEFINED HAVE_${NAME})
|
endif (NOT DEFINED HAVE_${NAME})
|
||||||
endif (${name}_FOUND)
|
endif (${name}_FOUND OR ${NAME}_FOUND)
|
||||||
endmacro (find_and_append_package_to prefix name)
|
endmacro (find_and_append_package_to prefix name)
|
||||||
|
|
||||||
# append to the list of variables associated with the project
|
# append to the list of variables associated with the project
|
||||||
|
@ -37,7 +37,8 @@
|
|||||||
|
|
||||||
# <http://www.vtk.org/Wiki/CMake:How_To_Find_Libraries>
|
# <http://www.vtk.org/Wiki/CMake:How_To_Find_Libraries>
|
||||||
|
|
||||||
include (Duplicates)
|
include (OpmFind)
|
||||||
|
|
||||||
# append all items from src into dst; both must be *names* of lists
|
# append all items from src into dst; both must be *names* of lists
|
||||||
macro (append_found src dst)
|
macro (append_found src dst)
|
||||||
foreach (_item IN LISTS ${src})
|
foreach (_item IN LISTS ${src})
|
||||||
@ -47,7 +48,7 @@ macro (append_found src dst)
|
|||||||
endforeach (_item)
|
endforeach (_item)
|
||||||
endmacro (append_found src dst)
|
endmacro (append_found src dst)
|
||||||
|
|
||||||
function (find_opm_package module deps header lib defs prog conf)
|
macro (find_opm_package module deps header lib defs prog conf)
|
||||||
# variables to pass on to other packages
|
# variables to pass on to other packages
|
||||||
if (FIND_QUIETLY)
|
if (FIND_QUIETLY)
|
||||||
set (${module}_QUIET "QUIET")
|
set (${module}_QUIET "QUIET")
|
||||||
@ -60,16 +61,6 @@ function (find_opm_package module deps header lib defs prog conf)
|
|||||||
return ()
|
return ()
|
||||||
endif (${${module}_FOUND})
|
endif (${${module}_FOUND})
|
||||||
|
|
||||||
# dependencies on other packages; underscore version only contains the
|
|
||||||
# name of the other package
|
|
||||||
set (_deps)
|
|
||||||
foreach (_dep IN LISTS deps)
|
|
||||||
separate_arguments (_args UNIX_COMMAND ${_dep})
|
|
||||||
find_package (${_args} QUIET)
|
|
||||||
list (GET _args 0 _name_only)
|
|
||||||
list (APPEND _deps ${_name_only})
|
|
||||||
endforeach (_dep)
|
|
||||||
|
|
||||||
# see if there is a pkg-config entry for this package, and use those
|
# see if there is a pkg-config entry for this package, and use those
|
||||||
# settings as a starting point
|
# settings as a starting point
|
||||||
find_package (PkgConfig)
|
find_package (PkgConfig)
|
||||||
@ -88,17 +79,22 @@ function (find_opm_package module deps header lib defs prog conf)
|
|||||||
# in standard system locations either, then start to wander
|
# in standard system locations either, then start to wander
|
||||||
# about and look for it in proximity to ourself. Qt Creator likes
|
# about and look for it in proximity to ourself. Qt Creator likes
|
||||||
# to put the build-directories as siblings to the source trees,
|
# to put the build-directories as siblings to the source trees,
|
||||||
# but with a -build suffix
|
# but with a -build suffix, DUNE likes to have the the build tree
|
||||||
|
# in a "build-cmake" sub-directory of each module
|
||||||
if (NOT (${module}_DIR OR ${module}_ROOT OR ${MODULE}_ROOT))
|
if (NOT (${module}_DIR OR ${module}_ROOT OR ${MODULE}_ROOT))
|
||||||
string (TOLOWER "${module}" _module_lower)
|
string (TOLOWER "${module}" _module_lower)
|
||||||
set (_guess
|
set (_guess
|
||||||
"../${module}"
|
"../${module}"
|
||||||
"../${module}-build"
|
|
||||||
"../${_module_lower}"
|
"../${_module_lower}"
|
||||||
|
)
|
||||||
|
set (_guess_bin_only
|
||||||
|
"../${module}-build"
|
||||||
"../${_module_lower}-build"
|
"../${_module_lower}-build"
|
||||||
|
"../../${module}/build-cmake"
|
||||||
|
"../../${_module_lower}/build-cmake"
|
||||||
)
|
)
|
||||||
set (_guess_bin)
|
set (_guess_bin)
|
||||||
foreach (_item IN ITEMS ${_guess})
|
foreach (_item IN ITEMS ${_guess} ${_guess_bin_only})
|
||||||
list (APPEND _guess_bin "${PROJECT_BINARY_DIR}/${_item}")
|
list (APPEND _guess_bin "${PROJECT_BINARY_DIR}/${_item}")
|
||||||
endforeach (_item)
|
endforeach (_item)
|
||||||
endif (NOT (${module}_DIR OR ${module}_ROOT OR ${MODULE}_ROOT))
|
endif (NOT (${module}_DIR OR ${module}_ROOT OR ${MODULE}_ROOT))
|
||||||
@ -122,7 +118,7 @@ function (find_opm_package module deps header lib defs prog conf)
|
|||||||
NAMES "${lib}"
|
NAMES "${lib}"
|
||||||
PATHS ${_guess_bin}
|
PATHS ${_guess_bin}
|
||||||
HINTS ${${module}_DIR} ${${module}_ROOT} ${${MODULE}_ROOT} ${PkgConf_${module}_LIBRARY_DIRS}
|
HINTS ${${module}_DIR} ${${module}_ROOT} ${${MODULE}_ROOT} ${PkgConf_${module}_LIBRARY_DIRS}
|
||||||
PATH_SUFFIXES "lib" "lib/.libs" ".libs" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}"
|
PATH_SUFFIXES "lib" "lib/.libs" ".libs" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "build-cmake/lib"
|
||||||
)
|
)
|
||||||
else (NOT "${lib}" STREQUAL "")
|
else (NOT "${lib}" STREQUAL "")
|
||||||
set (${module}_LIBRARY "")
|
set (${module}_LIBRARY "")
|
||||||
@ -132,45 +128,31 @@ function (find_opm_package module deps header lib defs prog conf)
|
|||||||
# list of necessities to build with the software
|
# list of necessities to build with the software
|
||||||
set (${module}_INCLUDE_DIRS "${${module}_INCLUDE_DIR}")
|
set (${module}_INCLUDE_DIRS "${${module}_INCLUDE_DIR}")
|
||||||
set (${module}_LIBRARIES "${${module}_LIBRARY}")
|
set (${module}_LIBRARIES "${${module}_LIBRARY}")
|
||||||
foreach (_dep IN LISTS _deps)
|
set (_deps)
|
||||||
# only add those packages we actually found (find_package will show
|
foreach (_dep IN ITEMS ${deps})
|
||||||
# an error if it was marked as REQUIRED)
|
separate_arguments (_args UNIX_COMMAND ${_dep})
|
||||||
if (${_dep}_FOUND)
|
find_and_append_package_to (${module} ${_args} ${${module}_QUIET})
|
||||||
list (APPEND ${module}_INCLUDE_DIRS ${${_dep}_INCLUDE_DIRS})
|
list (GET _args 0 _name_only)
|
||||||
list (APPEND ${module}_LIBRARIES ${${_dep}_LIBRARIES})
|
list (APPEND _deps ${_name_only})
|
||||||
list (APPEND ${module}_DEFINITIONS ${${_dep}_DEFINITIONS})
|
|
||||||
list (APPEND ${module}_CONFIG_VARS ${${_dep}_CONFIG_VARS})
|
|
||||||
list (APPEND ${module}_LINKER_FLAGS ${${_dep}_LINKER_FLAGS})
|
|
||||||
endif (${_dep}_FOUND)
|
|
||||||
endforeach (_dep)
|
endforeach (_dep)
|
||||||
|
|
||||||
# compile with this option to avoid avalanche of warnings
|
# compile with this option to avoid avalanche of warnings
|
||||||
set (${module}_DEFINITIONS "${${module}_DEFINITIONS}")
|
set (${module}_DEFINITIONS "${${module}_DEFINITIONS}")
|
||||||
foreach (_def IN LISTS defs)
|
foreach (_def IN ITEMS ${defs})
|
||||||
list (APPEND ${module}_DEFINITIONS "-D${_def}")
|
list (APPEND ${module}_DEFINITIONS "-D${_def}")
|
||||||
endforeach (_def)
|
endforeach (_def)
|
||||||
|
|
||||||
# tidy the lists before returning them
|
# tidy the lists before returning them
|
||||||
list (REMOVE_DUPLICATES ${module}_INCLUDE_DIRS)
|
remove_dup_deps (${module})
|
||||||
remove_duplicate_libraries (${module})
|
|
||||||
list (REMOVE_DUPLICATES ${module}_DEFINITIONS)
|
|
||||||
|
|
||||||
# these defines are used in dune/${module} headers, and should be put
|
# these defines are used in dune/${module} headers, and should be put
|
||||||
# in config.h when we include those
|
# in config.h when we include those
|
||||||
foreach (_var IN LISTS conf)
|
foreach (_var IN ITEMS ${conf})
|
||||||
# massage the name to remove source code formatting
|
# massage the name to remove source code formatting
|
||||||
string (REGEX REPLACE "^[\n\t\ ]+" "" _var "${_var}")
|
string (REGEX REPLACE "^[\n\t\ ]+" "" _var "${_var}")
|
||||||
string (REGEX REPLACE "[\n\t\ ]+$" "" _var "${_var}")
|
string (REGEX REPLACE "[\n\t\ ]+$" "" _var "${_var}")
|
||||||
list (APPEND ${module}_CONFIG_VARS ${_var})
|
list (APPEND ${module}_CONFIG_VARS ${_var})
|
||||||
endforeach (_var)
|
endforeach (_var)
|
||||||
foreach (_dep in _deps)
|
|
||||||
if (DEFINED ${_dep}_CONFIG_VARS)
|
|
||||||
list (APPEND ${module}_CONFIG_VARS ${_dep}_CONFIG_VARS)
|
|
||||||
endif (DEFINED ${_dep}_CONFIG_VARS)
|
|
||||||
endforeach (_dep)
|
|
||||||
if (${module}_CONFIG_VARS)
|
|
||||||
list (REMOVE_DUPLICATES ${module}_CONFIG_VARS)
|
|
||||||
endif (${module}_CONFIG_VARS)
|
|
||||||
|
|
||||||
# these are the defines that should be set when compiling
|
# these are the defines that should be set when compiling
|
||||||
# without config.h
|
# without config.h
|
||||||
@ -209,17 +191,13 @@ function (find_opm_package module deps header lib defs prog conf)
|
|||||||
|
|
||||||
# some genius that coded the FindPackageHandleStandardArgs figured out
|
# some genius that coded the FindPackageHandleStandardArgs figured out
|
||||||
# that the module name should be in uppercase (?!)
|
# that the module name should be in uppercase (?!)
|
||||||
set (${module}_FOUND "${${MODULE_UPPER}_FOUND}" PARENT_SCOPE)
|
set (${module}_FOUND "${${MODULE_UPPER}_FOUND}")
|
||||||
|
|
||||||
# return these variables to the caller
|
# print everything out if we're asked to
|
||||||
set (${module}_INCLUDE_DIRS "${${module}_INCLUDE_DIRS}" PARENT_SCOPE)
|
if (${module}_DEBUG)
|
||||||
set (${module}_LIBRARIES "${${module}_LIBRARIES}" PARENT_SCOPE)
|
debug_find_vars (${module})
|
||||||
set (${module}_DEFINITIONS "${${module}_DEFINITIONS}" PARENT_SCOPE)
|
endif (${module}_DEBUG)
|
||||||
set (${module}_CONFIG_VARS "${${module}_CONFIG_VARS}" PARENT_SCOPE)
|
endmacro (find_opm_package module deps header lib defs prog conf)
|
||||||
set (${module}_LINKER_FLAGS "${${module}_LINKER_FLAGS}" PARENT_SCOPE)
|
|
||||||
set (${module}_QUIET "${${module}_QUIET}" PARENT_SCOPE)
|
|
||||||
set (HAVE_${MODULE} "${HAVE_${MODULE}}" PARENT_SCOPE)
|
|
||||||
endfunction (find_opm_package module deps header lib defs prog conf)
|
|
||||||
|
|
||||||
# print all variables defined by the above macro
|
# print all variables defined by the above macro
|
||||||
function (debug_find_vars module)
|
function (debug_find_vars module)
|
||||||
|
17
configure
vendored
17
configure
vendored
@ -22,6 +22,7 @@ Optional Features:
|
|||||||
--disable-silent-rules print every compilation statement as executed
|
--disable-silent-rules print every compilation statement as executed
|
||||||
--enable-system-debug put .debug files in global GDB debug dir
|
--enable-system-debug put .debug files in global GDB debug dir
|
||||||
[default=yes if prefix=/usr, no otherwise]
|
[default=yes if prefix=/usr, no otherwise]
|
||||||
|
--enable-parallel process in parallel using MPI [default=no]
|
||||||
--enable-openmp activate experimental support for OpenMP
|
--enable-openmp activate experimental support for OpenMP
|
||||||
--disable-option-checking ignore unrecognized --enable/--with options
|
--disable-option-checking ignore unrecognized --enable/--with options
|
||||||
|
|
||||||
@ -93,6 +94,7 @@ buildtype=Debug
|
|||||||
pch_use=
|
pch_use=
|
||||||
#use_openmp=" -DUSE_OPENMP=OFF"
|
#use_openmp=" -DUSE_OPENMP=OFF"
|
||||||
use_openmp=
|
use_openmp=
|
||||||
|
use_mpi=
|
||||||
#silent_rules=" -DCMAKE_VERBOSE_MAKEFILE=OFF"
|
#silent_rules=" -DCMAKE_VERBOSE_MAKEFILE=OFF"
|
||||||
silent_rules=
|
silent_rules=
|
||||||
#debug_loc=" -DSYSTEM_DEBUG=OFF"
|
#debug_loc=" -DSYSTEM_DEBUG=OFF"
|
||||||
@ -226,6 +228,10 @@ for OPT in "$@"; do
|
|||||||
use_openmp=" -DUSE_OPENMP=OFF"
|
use_openmp=" -DUSE_OPENMP=OFF"
|
||||||
pkgname=""
|
pkgname=""
|
||||||
;;
|
;;
|
||||||
|
parallel)
|
||||||
|
use_mpi=" -DUSE_MPI=OFF"
|
||||||
|
pkgname=""
|
||||||
|
;;
|
||||||
agmg |\
|
agmg |\
|
||||||
ert |\
|
ert |\
|
||||||
superlu)
|
superlu)
|
||||||
@ -260,6 +266,15 @@ for OPT in "$@"; do
|
|||||||
# special flag; don't set shared/static
|
# special flag; don't set shared/static
|
||||||
shared=""
|
shared=""
|
||||||
;;
|
;;
|
||||||
|
parallel)
|
||||||
|
use_openmp=" -DUSE_MPI=ON"
|
||||||
|
# special flag; don't set shared/static
|
||||||
|
shared=""
|
||||||
|
;;
|
||||||
|
pch)
|
||||||
|
pch_use=" -DPRECOMPILE_HEADERS:BOOL=ON"
|
||||||
|
shared=""
|
||||||
|
;;
|
||||||
# this flag is just for compatibility with the deprecation
|
# this flag is just for compatibility with the deprecation
|
||||||
# flag in DUNE, so we can build without warnings
|
# flag in DUNE, so we can build without warnings
|
||||||
fieldvector-size-is-method)
|
fieldvector-size-is-method)
|
||||||
@ -308,7 +323,7 @@ for a in "${VARS[@]}"; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# pass everything on to CMake
|
# pass everything on to CMake
|
||||||
CMDLINE="env ${ENVVARS} ${CMAKE_COMMAND} \"${srcdir}\" \"-DCMAKE_INSTALL_PREFIX=$prefix\" -DCMAKE_BUILD_TYPE=${buildtype}${pch_use}${silent_rules}${debug_loc}${use_openmp} ${FEATURES}"
|
CMDLINE="env ${ENVVARS} ${CMAKE_COMMAND} \"${srcdir}\" \"-DCMAKE_INSTALL_PREFIX=$prefix\" -DCMAKE_BUILD_TYPE=${buildtype}${pch_use}${silent_rules}${debug_loc}${use_openmp}${use_mpi} ${FEATURES}"
|
||||||
echo --- calling CMake ---
|
echo --- calling CMake ---
|
||||||
echo ${CMDLINE}
|
echo ${CMDLINE}
|
||||||
eval exec ${CMDLINE}
|
eval exec ${CMDLINE}
|
||||||
|
@ -1090,7 +1090,7 @@ void EclipseGridParser::getNumericErtFields(const string& filename)
|
|||||||
{
|
{
|
||||||
#ifdef HAVE_ERT
|
#ifdef HAVE_ERT
|
||||||
// Read file
|
// Read file
|
||||||
ecl_file_type * ecl_file = ecl_file_open(filename.c_str());
|
ecl_file_type * ecl_file = ecl_file_open(filename.c_str() , 0);
|
||||||
if (ecl_file == NULL) {
|
if (ecl_file == NULL) {
|
||||||
THROW("Could not open IMPORTed file " << filename);
|
THROW("Could not open IMPORTed file " << filename);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user