remove libecl from buildsystem, jenkins and packaging
This commit is contained in:
committed by
Bård Skaflestad
parent
d1db2ec396
commit
247b5685cc
@@ -225,14 +225,11 @@ if (OPM_ENABLE_PYTHON)
|
|||||||
set(PYTHON_INSTALL_PREFIX "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/${PYTHON_PACKAGE_PATH}" CACHE STRING "Subdirectory to install Python modules in")
|
set(PYTHON_INSTALL_PREFIX "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/${PYTHON_PACKAGE_PATH}" CACHE STRING "Subdirectory to install Python modules in")
|
||||||
|
|
||||||
make_directory(${CMAKE_BINARY_DIR}/python)
|
make_directory(${CMAKE_BINARY_DIR}/python)
|
||||||
get_target_property(_ecl_include_dirs ecl INTERFACE_INCLUDE_DIRECTORIES)
|
|
||||||
get_target_property(_opmcommon_include_dirs opmcommon INCLUDE_DIRECTORIES)
|
get_target_property(_opmcommon_include_dirs opmcommon INCLUDE_DIRECTORIES)
|
||||||
list(APPEND _opmcommon_include_dirs ${_ecl_include_dirs})
|
list(APPEND _opmcommon_include_dirs ${_ecl_include_dirs})
|
||||||
string(REPLACE ";" ":" _setup_include_dirs "${_opmcommon_include_dirs}")
|
string(REPLACE ";" ":" _setup_include_dirs "${_opmcommon_include_dirs}")
|
||||||
|
|
||||||
get_target_property(_ecl_lib ecl LOCATION)
|
set(_opmcommon_lib_dirs ${CMAKE_BINARY_DIR}/lib ${CMAKE_PREFIX_PATH}/lib)
|
||||||
get_filename_component(_ecl_lib_dir ${_ecl_lib} DIRECTORY)
|
|
||||||
set(_opmcommon_lib_dirs ${_ecl_lib_dir} ${CMAKE_BINARY_DIR}/lib ${CMAKE_PREFIX_PATH}/lib)
|
|
||||||
string(REPLACE ";" ":" _setup_lib_dirs "${_opmcommon_lib_dirs}")
|
string(REPLACE ";" ":" _setup_lib_dirs "${_opmcommon_lib_dirs}")
|
||||||
|
|
||||||
add_custom_command(OUTPUT python/python/opm/libopmcommon_python.so
|
add_custom_command(OUTPUT python/python/opm/libopmcommon_python.so
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Libs to link tests against
|
# Libs to link tests against
|
||||||
set(TEST_LIBS opmcommon ecl Boost::unit_test_framework)
|
set(TEST_LIBS opmcommon Boost::unit_test_framework)
|
||||||
set(EXTRA_TESTS)
|
set(EXTRA_TESTS)
|
||||||
|
|
||||||
# Generated source, needs to be here
|
# Generated source, needs to be here
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ if(NOT cjson_FOUND)
|
|||||||
endif()
|
endif()
|
||||||
add_executable(genkw ${genkw_SOURCES})
|
add_executable(genkw ${genkw_SOURCES})
|
||||||
|
|
||||||
target_link_libraries(genkw ecl Boost::regex Boost::filesystem Boost::system)
|
target_link_libraries(genkw Boost::regex Boost::filesystem Boost::system)
|
||||||
|
|
||||||
# Generate keyword list
|
# Generate keyword list
|
||||||
include(src/opm/parser/eclipse/share/keywords/keyword_list.cmake)
|
include(src/opm/parser/eclipse/share/keywords/keyword_list.cmake)
|
||||||
|
|||||||
@@ -1,287 +0,0 @@
|
|||||||
# - Find the Ensemble-based Reservoir Tool (ERT)
|
|
||||||
#
|
|
||||||
# Set the cache variable ERT_ROOT to the install location of the ERT
|
|
||||||
# libraries and header files.
|
|
||||||
#
|
|
||||||
# If found, it sets these variables:
|
|
||||||
#
|
|
||||||
# ERT_INCLUDE_DIRS Header file directories
|
|
||||||
# ERT_LIBRARIES Archives and shared objects
|
|
||||||
# ERT_CONFIG_VARS Definitions that goes in config.h
|
|
||||||
# ERT_LINKER_FLAGS Options that must be passed to linker
|
|
||||||
#
|
|
||||||
# It will also add to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS if necessary to
|
|
||||||
# link with the ERT libraries.
|
|
||||||
|
|
||||||
# variables to pass on to other packages
|
|
||||||
if (FIND_QUIETLY)
|
|
||||||
set (ERT_QUIET "QUIET")
|
|
||||||
else (FIND_QUIETLY)
|
|
||||||
set (ERT_QUIET "")
|
|
||||||
endif (FIND_QUIETLY)
|
|
||||||
|
|
||||||
# if a directory has been specified by the user, then don't go look
|
|
||||||
# in the system directories as well
|
|
||||||
if (ERT_ROOT)
|
|
||||||
set (_no_default_path "NO_DEFAULT_PATH")
|
|
||||||
else (ERT_ROOT)
|
|
||||||
set (_no_default_path "")
|
|
||||||
endif (ERT_ROOT)
|
|
||||||
|
|
||||||
# ERT doesn't have any config-mode file, so we need to specify the root
|
|
||||||
# directory in its own variable
|
|
||||||
find_path (ERT_ECL_INCLUDE_DIR
|
|
||||||
NAMES "ert/ecl/ecl_util.h"
|
|
||||||
HINTS "${ERT_ROOT}"
|
|
||||||
PATHS "${PROJECT_SOURCE_DIR}/../libecl" "${PROJECT_SOURCE_DIR}/../ert"
|
|
||||||
PATH_SUFFIXES "libecl/include/" "include"
|
|
||||||
DOC "Path to ERT Eclipse library header files"
|
|
||||||
${_no_default_path}
|
|
||||||
)
|
|
||||||
find_path (ERT_ECL_WELL_INCLUDE_DIR
|
|
||||||
NAMES "ert/ecl_well/well_const.h"
|
|
||||||
HINTS "${ERT_ROOT}"
|
|
||||||
PATHS "${PROJECT_SOURCE_DIR}/../libecl" "${PROJECT_SOURCE_DIR}/../ert"
|
|
||||||
PATH_SUFFIXES "libecl_well/include/" "include"
|
|
||||||
DOC "Path to ERT Eclipse library header files"
|
|
||||||
${_no_default_path}
|
|
||||||
)
|
|
||||||
find_path (ERT_ECLXX_INCLUDE_DIR
|
|
||||||
NAMES "ert/ecl/EclKW.hpp"
|
|
||||||
HINTS "${ERT_ROOT}"
|
|
||||||
PATHS "${PROJECT_SOURCE_DIR}/../libecl" "${PROJECT_SOURCE_DIR}/../ert"
|
|
||||||
PATH_SUFFIXES "libeclxx/include/" "include"
|
|
||||||
DOC "Path to ERT Eclipse C++ library header files"
|
|
||||||
${_no_default_path}
|
|
||||||
)
|
|
||||||
find_path (ERT_UTIL_INCLUDE_DIR
|
|
||||||
NAMES "ert/util/stringlist.h"
|
|
||||||
HINTS "${ERT_ROOT}"
|
|
||||||
PATHS "${PROJECT_SOURCE_DIR}/../libecl" "${PROJECT_SOURCE_DIR}/../ert"
|
|
||||||
PATH_SUFFIXES "libert_util/include/" "include"
|
|
||||||
DOC "Path to ERT Eclipse library header files"
|
|
||||||
${_no_default_path}
|
|
||||||
)
|
|
||||||
find_path (ERT_UTILXX_INCLUDE_DIR
|
|
||||||
NAMES "ert/util/ert_unique_ptr.hpp"
|
|
||||||
HINTS "${ERT_ROOT}"
|
|
||||||
PATHS "${PROJECT_SOURCE_DIR}/../libecl" "${PROJECT_SOURCE_DIR}/../ert"
|
|
||||||
PATH_SUFFIXES "libert_utilxx/include/" "include"
|
|
||||||
DOC "Path to ERT Eclipse C++ library header files"
|
|
||||||
${_no_default_path}
|
|
||||||
)
|
|
||||||
find_path (ERT_GEN_INCLUDE_DIR
|
|
||||||
NAMES "ert/util/int_vector.h"
|
|
||||||
HINTS "${ERT_ROOT}"
|
|
||||||
PATHS "${PROJECT_SOURCE_DIR}/../libecl" "${PROJECT_SOURCE_DIR}/../ert"
|
|
||||||
PATH_SUFFIXES "libert_util/include"
|
|
||||||
"include" "build/libert_util/include" "build/libert_util/include"
|
|
||||||
DOC "Path to ERT generated library header files"
|
|
||||||
${_no_default_path}
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# need all of these libraries
|
|
||||||
if (CMAKE_SIZEOF_VOID_P)
|
|
||||||
math (EXPR _BITS "8 * ${CMAKE_SIZEOF_VOID_P}")
|
|
||||||
endif (CMAKE_SIZEOF_VOID_P)
|
|
||||||
find_library (ERT_LIBRARY_ECL
|
|
||||||
NAMES "ecl"
|
|
||||||
HINTS "${ERT_ROOT}"
|
|
||||||
PATHS "${PROJECT_BINARY_DIR}/../libecl"
|
|
||||||
"${PROJECT_SOURCE_DIR}/../libecl/build"
|
|
||||||
"${PROJECT_BINARY_DIR}/../libecl-build"
|
|
||||||
"${PROJECT_BINARY_DIR}/../ert"
|
|
||||||
"${PROJECT_SOURCE_DIR}/../ert/build"
|
|
||||||
"${PROJECT_BINARY_DIR}/../ert-build"
|
|
||||||
PATH_SUFFIXES "lib" "lib/Release" "lib/Debug" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}"
|
|
||||||
DOC "Path to ERT Eclipse library archive/shared object files"
|
|
||||||
${_no_default_path}
|
|
||||||
)
|
|
||||||
find_library (ERT_LIBRARY_ECLXX
|
|
||||||
NAMES "eclxx"
|
|
||||||
HINTS "${ERT_ROOT}"
|
|
||||||
PATHS "${PROJECT_BINARY_DIR}/../libecl"
|
|
||||||
"${PROJECT_SOURCE_DIR}/../libecl/build"
|
|
||||||
"${PROJECT_BINARY_DIR}/../libecl-build"
|
|
||||||
"${PROJECT_BINARY_DIR}/../ert"
|
|
||||||
"${PROJECT_SOURCE_DIR}/../ert/build"
|
|
||||||
"${PROJECT_BINARY_DIR}/../ert-build"
|
|
||||||
PATH_SUFFIXES "lib" "lib/Release" "lib/Debug" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}"
|
|
||||||
DOC "Path to ERT Eclipse C++ library archive/shared object files"
|
|
||||||
${_no_default_path}
|
|
||||||
)
|
|
||||||
find_library (ERT_LIBRARY_ECL_WELL
|
|
||||||
NAMES "ecl_well"
|
|
||||||
HINTS "${ERT_ROOT}"
|
|
||||||
PATHS "${PROJECT_BINARY_DIR}/../libecl"
|
|
||||||
"${PROJECT_SOURCE_DIR}/../libecl/build"
|
|
||||||
"${PROJECT_BINARY_DIR}/../libecl-build"
|
|
||||||
"${PROJECT_BINARY_DIR}/../ert"
|
|
||||||
"${PROJECT_SOURCE_DIR}/../ert/build"
|
|
||||||
"${PROJECT_BINARY_DIR}/../ert-build"
|
|
||||||
PATH_SUFFIXES "lib" "lib/Release" "lib/Debug" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}"
|
|
||||||
DOC "Path to ERT Eclipse library archive/shared object files"
|
|
||||||
${_no_default_path}
|
|
||||||
)
|
|
||||||
find_library (ERT_LIBRARY_GEOMETRY
|
|
||||||
NAMES "ert_geometry"
|
|
||||||
HINTS "${ERT_ROOT}"
|
|
||||||
PATHS "${PROJECT_BINARY_DIR}/../libecl"
|
|
||||||
"${PROJECT_SOURCE_DIR}/../libecl/build"
|
|
||||||
"${PROJECT_BINARY_DIR}/../libecl-build"
|
|
||||||
"${PROJECT_BINARY_DIR}/../ert"
|
|
||||||
"${PROJECT_SOURCE_DIR}/../ert/build"
|
|
||||||
"${PROJECT_BINARY_DIR}/../ert-build"
|
|
||||||
PATH_SUFFIXES "lib" "lib/Release" "lib/Debug" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}"
|
|
||||||
DOC "Path to ERT Geometry library archive/shared object files"
|
|
||||||
${_no_default_path}
|
|
||||||
)
|
|
||||||
find_library (ERT_LIBRARY_UTIL
|
|
||||||
NAMES "ert_util"
|
|
||||||
HINTS "${ERT_ROOT}"
|
|
||||||
PATHS "${PROJECT_BINARY_DIR}/../libecl"
|
|
||||||
"${PROJECT_SOURCE_DIR}/../libecl/build"
|
|
||||||
"${PROJECT_BINARY_DIR}/../libecl-build"
|
|
||||||
"${PROJECT_BINARY_DIR}/../ert"
|
|
||||||
"${PROJECT_SOURCE_DIR}/../ert/build"
|
|
||||||
"${PROJECT_BINARY_DIR}/../ert-build"
|
|
||||||
PATH_SUFFIXES "lib" "lib/Release" "lib/Debug" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}"
|
|
||||||
DOC "Path to ERT Utilities library archive/shared object files"
|
|
||||||
${_no_default_path}
|
|
||||||
)
|
|
||||||
find_library (ERT_LIBRARY_UTILXX
|
|
||||||
NAMES "ert_utilxx"
|
|
||||||
HINTS "${ERT_ROOT}"
|
|
||||||
PATHS "${PROJECT_BINARY_DIR}/../libecl"
|
|
||||||
"${PROJECT_SOURCE_DIR}/../libecl/build"
|
|
||||||
"${PROJECT_BINARY_DIR}/../libecl-build"
|
|
||||||
"${PROJECT_BINARY_DIR}/../ert"
|
|
||||||
"${PROJECT_SOURCE_DIR}/../ert/build"
|
|
||||||
"${PROJECT_BINARY_DIR}/../ert-build"
|
|
||||||
PATH_SUFFIXES "lib" "lib/Release" "lib/Debug" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}"
|
|
||||||
DOC "Path to ERT Utilities library archive/shared object files"
|
|
||||||
${_no_default_path}
|
|
||||||
)
|
|
||||||
# the "library" found here is actually a list of several files
|
|
||||||
list (APPEND ERT_INCLUDE_DIR
|
|
||||||
${ERT_ECL_INCLUDE_DIR}
|
|
||||||
${ERT_ECL_WELL_INCLUDE_DIR}
|
|
||||||
${ERT_ECLXX_INCLUDE_DIR}
|
|
||||||
${ERT_UTIL_INCLUDE_DIR}
|
|
||||||
${ERT_UTILXX_INCLUDE_DIR}
|
|
||||||
${ERT_GEN_INCLUDE_DIR}
|
|
||||||
)
|
|
||||||
list (APPEND ERT_LIBRARY
|
|
||||||
${ERT_LIBRARY_ECL}
|
|
||||||
${ERT_LIBRARY_ECLXX}
|
|
||||||
${ERT_LIBRARY_ECL_WELL}
|
|
||||||
${ERT_LIBRARY_GEOMETRY}
|
|
||||||
${ERT_LIBRARY_UTIL}
|
|
||||||
${ERT_LIBRARY_UTILXX}
|
|
||||||
)
|
|
||||||
list (APPEND ERT_LIBRARIES ${ERT_LIBRARY})
|
|
||||||
list (APPEND ERT_INCLUDE_DIRS ${ERT_INCLUDE_DIR})
|
|
||||||
|
|
||||||
# if we didn't find any files, then don't proceed through the entire dependency list
|
|
||||||
include (FindPackageHandleStandardArgs)
|
|
||||||
if (ERT_INCLUDE_DIR MATCHES "-NOTFOUND" OR ERT_LIBRARIES MATCHES "-NOTFOUND")
|
|
||||||
find_package_handle_standard_args (ERT
|
|
||||||
DEFAULT_MSG
|
|
||||||
ERT_INCLUDE_DIR ERT_LIBRARY
|
|
||||||
)
|
|
||||||
# clear the cache so the find probe is attempted again if files becomes
|
|
||||||
# available (only upon a unsuccessful *compile* should we disable further
|
|
||||||
# probing)
|
|
||||||
set (HAVE_ERT)
|
|
||||||
unset (HAVE_ERT CACHE)
|
|
||||||
return ()
|
|
||||||
endif (ERT_INCLUDE_DIR MATCHES "-NOTFOUND" OR ERT_LIBRARIES MATCHES "-NOTFOUND")
|
|
||||||
|
|
||||||
|
|
||||||
# dependencies
|
|
||||||
|
|
||||||
# parallel programming
|
|
||||||
include (UseOpenMP)
|
|
||||||
find_openmp (ERT)
|
|
||||||
|
|
||||||
# compression library
|
|
||||||
find_package (ZLIB ${ERT_QUIET})
|
|
||||||
if (ZLIB_FOUND)
|
|
||||||
list (APPEND ERT_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS})
|
|
||||||
list (APPEND ERT_LIBRARIES ${ZLIB_LIBRARIES})
|
|
||||||
endif (ZLIB_FOUND)
|
|
||||||
|
|
||||||
# numerics
|
|
||||||
find_package (BLAS ${ERT_QUIET})
|
|
||||||
if (BLAS_FOUND)
|
|
||||||
list (APPEND ERT_INCLUDE_DIRS ${BLAS_INCLUDE_DIRS})
|
|
||||||
list (APPEND ERT_LIBRARIES ${BLAS_LIBRARIES})
|
|
||||||
list (APPEND ERT_LINKER_FLAGS ${BLAS_LINKER_FLAGS})
|
|
||||||
endif (BLAS_FOUND)
|
|
||||||
|
|
||||||
find_package (LAPACK ${ERT_QUIET})
|
|
||||||
if (LAPACK_FOUND)
|
|
||||||
list (APPEND ERT_INCLUDE_DIRS ${LAPACK_INCLUDE_DIRS})
|
|
||||||
list (APPEND ERT_LIBRARIES ${LAPACK_LIBRARIES})
|
|
||||||
list (APPEND ERT_LINKER_FLAGS ${LAPACK_LINKER_FLAGS})
|
|
||||||
endif (LAPACK_FOUND)
|
|
||||||
|
|
||||||
# math library (should exist on all unices; automatically linked on Windows)
|
|
||||||
if (UNIX)
|
|
||||||
find_library (MATH_LIBRARY
|
|
||||||
NAMES "m"
|
|
||||||
)
|
|
||||||
list (APPEND ERT_LIBRARIES ${MATH_LIBRARY})
|
|
||||||
endif (UNIX)
|
|
||||||
|
|
||||||
# if shared libraries are disabled on linux, explcitly linking to the
|
|
||||||
# pthreads library is required by ERT
|
|
||||||
find_package(Threads ${ERT_QUIET})
|
|
||||||
if (CMAKE_THREAD_LIBS_INIT)
|
|
||||||
list (APPEND ERT_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Platform specific library where dlopen with friends lives
|
|
||||||
list (APPEND ERT_LIBRARIES ${CMAKE_DL_LIBS})
|
|
||||||
|
|
||||||
# since OpenMP often implies pthreads, we need to tidy up
|
|
||||||
# (last instance of library must be left standing, thus reversing that
|
|
||||||
# list before removing duplicates)
|
|
||||||
include (Duplicates)
|
|
||||||
remove_dup_deps (ERT)
|
|
||||||
|
|
||||||
# see if we can compile a minimum example
|
|
||||||
# CMake logical test doesn't handle lists (sic)
|
|
||||||
if (NOT (ERT_INCLUDE_DIR MATCHES "-NOTFOUND" OR ERT_LIBRARIES MATCHES "-NOTFOUND"))
|
|
||||||
include (CMakePushCheckState)
|
|
||||||
include (CheckCSourceCompiles)
|
|
||||||
cmake_push_check_state ()
|
|
||||||
set (CMAKE_REQUIRED_INCLUDES ${ERT_INCLUDE_DIR})
|
|
||||||
set (CMAKE_REQUIRED_LIBRARIES ${ERT_LIBRARIES})
|
|
||||||
check_cxx_source_compiles (
|
|
||||||
"#include <ert/ecl/ecl_grid.h>
|
|
||||||
int main ( ) {
|
|
||||||
ecl_grid_type * grid = ecl_grid_alloc_rectangular( 10,10,10,1,1,1, NULL);
|
|
||||||
ecl_grid_free( grid );
|
|
||||||
return 0;
|
|
||||||
}" HAVE_ERT)
|
|
||||||
cmake_pop_check_state ()
|
|
||||||
else (NOT (ERT_INCLUDE_DIR MATCHES "-NOTFOUND" OR ERT_LIBRARIES MATCHES "-NOTFOUND"))
|
|
||||||
# clear the cache so the find probe is attempted again if files becomes
|
|
||||||
# available (only upon a unsuccessful *compile* should we disable further
|
|
||||||
# probing)
|
|
||||||
set (HAVE_ERT)
|
|
||||||
unset (HAVE_ERT CACHE)
|
|
||||||
endif (NOT (ERT_INCLUDE_DIR MATCHES "-NOTFOUND" OR ERT_LIBRARIES MATCHES "-NOTFOUND"))
|
|
||||||
|
|
||||||
# if the test program didn't compile, but was required to do so, bail
|
|
||||||
# out now and display an error; otherwise limp on
|
|
||||||
find_package_handle_standard_args (ERT
|
|
||||||
DEFAULT_MSG
|
|
||||||
ERT_INCLUDE_DIR ERT_LIBRARY HAVE_ERT
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
# - Find the Python wrappers for Ensemble-based Reservoir Tool (ERT)
|
|
||||||
#
|
|
||||||
# Set the cache variable ERT_PYTHON_PATH to the install location of
|
|
||||||
# the root ert package.
|
|
||||||
|
|
||||||
find_package(PythonInterp)
|
|
||||||
if(PYTHONINTERP_FOUND)
|
|
||||||
|
|
||||||
# We try to find the ert Python distribution. This is done by running
|
|
||||||
# Python code which tries to 'import ert' and prints out the path to
|
|
||||||
# the module if the import succeeds.
|
|
||||||
#
|
|
||||||
# The normal Python import machinery is employed, so if you have
|
|
||||||
# installed ert python in a default location, or alternatively set the
|
|
||||||
# PYTHONPATH variable the ert Python distribution will eventually be
|
|
||||||
# found there, independently of the alternatives which are tested with
|
|
||||||
# the ${PATH_LIST} variable.
|
|
||||||
|
|
||||||
if (EXISTS "/etc/debian_version")
|
|
||||||
set( PYTHON_PACKAGE_PATH "dist-packages")
|
|
||||||
else()
|
|
||||||
set( PYTHON_PACKAGE_PATH "site-packages")
|
|
||||||
endif()
|
|
||||||
set(PYTHON_INSTALL_PREFIX "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/${PYTHON_PACKAGE_PATH}" CACHE STRING "Subdirectory to install Python modules in")
|
|
||||||
|
|
||||||
set(PATH_LIST)
|
|
||||||
if (ERT_ROOT)
|
|
||||||
list(APPEND PATH_LIST ${ERT_ROOT})
|
|
||||||
endif()
|
|
||||||
list(APPEND PATH_LIST ${CMAKE_PREFIX_PATH})
|
|
||||||
|
|
||||||
# Add various popular sibling alternatives.
|
|
||||||
list(APPEND PATH_LIST "${PROJECT_SOURCE_DIR}/../ert/build"
|
|
||||||
"${PROJECT_BINARY_DIR}/../ert-build")
|
|
||||||
|
|
||||||
foreach( PATH ${PATH_LIST})
|
|
||||||
set( python_code "import sys; sys.path.insert(0 , '${PATH}/${PYTHON_INSTALL_PREFIX}'); import os.path; import inspect; import ert; print os.path.dirname(os.path.dirname(inspect.getfile(ert))); from ert.ecl import EclSum")
|
|
||||||
execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "${python_code}"
|
|
||||||
RESULT_VARIABLE import_result
|
|
||||||
OUTPUT_VARIABLE stdout_output
|
|
||||||
ERROR_VARIABLE stderr_output
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE )
|
|
||||||
|
|
||||||
if (${import_result} EQUAL 0)
|
|
||||||
set( ERT_PYTHON_PATH ${stdout_output} CACHE PATH "Python path for ERT Python" )
|
|
||||||
break()
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
endif()
|
|
||||||
find_package_handle_standard_args("ERTPython" DEFAULT_MSG ERT_PYTHON_PATH)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -152,22 +152,7 @@ macro (find_and_append_package_to prefix name)
|
|||||||
if ( (NOT DEFINED ${name}_FOUND AND NOT DEFINED ${NAME}_FOUND )
|
if ( (NOT DEFINED ${name}_FOUND AND NOT DEFINED ${NAME}_FOUND )
|
||||||
OR _search_components GREATER -1)
|
OR _search_components GREATER -1)
|
||||||
string(REGEX MATCH "(dune|opm)-.*" _is_opm ${name})
|
string(REGEX MATCH "(dune|opm)-.*" _is_opm ${name})
|
||||||
if(${name} STREQUAL "ecl")
|
if(_${name}_exempted LESS 0 AND NOT _is_opm)
|
||||||
# Give us a chance to find ecl installed to CMAKE_INSTALL_PREFIX.
|
|
||||||
# We need to deactivate the package registry for this.
|
|
||||||
create_module_dir_var(ecl)
|
|
||||||
set(ARGN_NO_REQUIRED ${ARGN})
|
|
||||||
if(ARGN)
|
|
||||||
list(REMOVE_ITEM ARGN_NO_REQUIRED "REQUIRED")
|
|
||||||
endif()
|
|
||||||
find_package (${name} ${ARGN_NO_REQUIRED} NO_CMAKE_SYSTEM_PACKAGE_REGISTRY NO_CMAKE_PACKAGE_REGISTRY)
|
|
||||||
if(TARGET ecl)
|
|
||||||
# Need to grab from target to enable transitional depends
|
|
||||||
#get_target_property(ecl_INCLUDE_DIRS ecl INTERFACE_INCLUDE_DIRECTORIES)
|
|
||||||
set(ecl_LIBRARIES ecl)
|
|
||||||
set(HAVE_ERT 1)
|
|
||||||
endif()
|
|
||||||
elseif(_${name}_exempted LESS 0 AND NOT _is_opm)
|
|
||||||
find_package (${name} ${ARGN})
|
find_package (${name} ${ARGN})
|
||||||
elseif(_${name}_exempted GREATER -1)
|
elseif(_${name}_exempted GREATER -1)
|
||||||
find_package (${name} ${ARGN})
|
find_package (${name} ${ARGN})
|
||||||
|
|||||||
@@ -9,12 +9,7 @@ macro(create_module_dir_var module)
|
|||||||
get_filename_component(_parent_dir_name ${_parent_full_dir} NAME)
|
get_filename_component(_parent_dir_name ${_parent_full_dir} NAME)
|
||||||
#Try if <module-name>/<build-dir> is used
|
#Try if <module-name>/<build-dir> is used
|
||||||
get_filename_component(_modules_dir ${_parent_full_dir} DIRECTORY)
|
get_filename_component(_modules_dir ${_parent_full_dir} DIRECTORY)
|
||||||
if ("${module}" STREQUAL "ecl")
|
|
||||||
#use clone directory libecl
|
|
||||||
set(_clone_dir "libecl")
|
|
||||||
else()
|
|
||||||
set(_clone_dir "${module}")
|
set(_clone_dir "${module}")
|
||||||
endif()
|
|
||||||
if(IS_DIRECTORY ${_modules_dir}/${_clone_dir}/${_leaf_dir_name})
|
if(IS_DIRECTORY ${_modules_dir}/${_clone_dir}/${_leaf_dir_name})
|
||||||
set(${module}_DIR ${_modules_dir}/${_clone_dir}/${_leaf_dir_name})
|
set(${module}_DIR ${_modules_dir}/${_clone_dir}/${_leaf_dir_name})
|
||||||
else()
|
else()
|
||||||
|
|||||||
2
debian/control
vendored
2
debian/control
vendored
@@ -5,7 +5,7 @@ Build-Depends: build-essential, debhelper (>= 9),
|
|||||||
pkg-config, cmake, git, libtool, doxygen,
|
pkg-config, cmake, git, libtool, doxygen,
|
||||||
texlive-latex-extra, texlive-latex-recommended,
|
texlive-latex-extra, texlive-latex-recommended,
|
||||||
ghostscript, libboost-system-dev, libboost-test-dev,
|
ghostscript, libboost-system-dev, libboost-test-dev,
|
||||||
libecl-dev, libboost-regex-dev, libboost-filesystem-dev,
|
libboost-regex-dev, libboost-filesystem-dev,
|
||||||
zlib1g-dev
|
zlib1g-dev
|
||||||
Standards-Version: 3.9.2
|
Standards-Version: 3.9.2
|
||||||
Section: libs
|
Section: libs
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ declare -A configurations
|
|||||||
declare -A EXTRA_MODULE_FLAGS
|
declare -A EXTRA_MODULE_FLAGS
|
||||||
EXTRA_MODULE_FLAGS[opm-simulators]="-DBUILD_EBOS_EXTENSIONS=ON -DBUILD_EBOS_DEBUG_EXTENSIONS=ON -DBUILD_FLOW_VARIANTS=ON"
|
EXTRA_MODULE_FLAGS[opm-simulators]="-DBUILD_EBOS_EXTENSIONS=ON -DBUILD_EBOS_DEBUG_EXTENSIONS=ON -DBUILD_FLOW_VARIANTS=ON"
|
||||||
EXTRA_MODULE_FLAGS[opm-common]="-DOPM_ENABLE_PYTHON=ON -DOPM_ENABLE_EMBEDDED_PYTHON=ON -DOPM_INSTALL_PYTHON=ON"
|
EXTRA_MODULE_FLAGS[opm-common]="-DOPM_ENABLE_PYTHON=ON -DOPM_ENABLE_EMBEDDED_PYTHON=ON -DOPM_INSTALL_PYTHON=ON"
|
||||||
EXTRA_MODULE_FLAGS[libecl]="-DCMAKE_POSITION_INDEPENDENT_CODE=1"
|
|
||||||
|
|
||||||
# Parse revisions from trigger comment and setup arrays
|
# Parse revisions from trigger comment and setup arrays
|
||||||
# Depends on: 'upstreams', upstreamRev',
|
# Depends on: 'upstreams', upstreamRev',
|
||||||
@@ -13,7 +12,6 @@ EXTRA_MODULE_FLAGS[libecl]="-DCMAKE_POSITION_INDEPENDENT_CODE=1"
|
|||||||
# 'ghprbCommentBody',
|
# 'ghprbCommentBody',
|
||||||
# 'CONFIGURATIONS', 'TOOLCHAINS'
|
# 'CONFIGURATIONS', 'TOOLCHAINS'
|
||||||
function parseRevisions {
|
function parseRevisions {
|
||||||
# Set default for libecl to be last known good commit.
|
|
||||||
for upstream in ${upstreams[*]}
|
for upstream in ${upstreams[*]}
|
||||||
do
|
do
|
||||||
if grep -qi "$upstream=" <<< $ghprbCommentBody
|
if grep -qi "$upstream=" <<< $ghprbCommentBody
|
||||||
@@ -148,12 +146,7 @@ function clone_module {
|
|||||||
mkdir -p $WORKSPACE/deps/$1
|
mkdir -p $WORKSPACE/deps/$1
|
||||||
cd $WORKSPACE/deps/$1
|
cd $WORKSPACE/deps/$1
|
||||||
git init .
|
git init .
|
||||||
if [ "$1" == "libecl" ]
|
|
||||||
then
|
|
||||||
git remote add origin https://github.com/equinor/$1
|
|
||||||
else
|
|
||||||
git remote add origin https://github.com/OPM/$1
|
git remote add origin https://github.com/OPM/$1
|
||||||
fi
|
|
||||||
git fetch --depth 1 origin $2:branch_to_build
|
git fetch --depth 1 origin $2:branch_to_build
|
||||||
git checkout branch_to_build
|
git checkout branch_to_build
|
||||||
git log HEAD -1 | cat
|
git log HEAD -1 | cat
|
||||||
|
|||||||
@@ -6,11 +6,9 @@ source `dirname $0`/build-opm-module.sh
|
|||||||
mkdir deps
|
mkdir deps
|
||||||
ln -sf $WORKSPACE deps/opm-common
|
ln -sf $WORKSPACE deps/opm-common
|
||||||
|
|
||||||
|
# No upstreams
|
||||||
declare -a upstreams
|
declare -a upstreams
|
||||||
upstreams=(libecl)
|
|
||||||
|
|
||||||
declare -A upstreamRev
|
declare -A upstreamRev
|
||||||
upstreamRev[libecl]=master
|
|
||||||
|
|
||||||
# Downstreams and revisions
|
# Downstreams and revisions
|
||||||
declare -a downstreams
|
declare -a downstreams
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ set (opm-common_DEPS
|
|||||||
|
|
||||||
if(ENABLE_ECL_INPUT)
|
if(ENABLE_ECL_INPUT)
|
||||||
list(APPEND opm-common_DEPS
|
list(APPEND opm-common_DEPS
|
||||||
"ecl REQUIRED"
|
|
||||||
# various runtime library enhancements
|
# various runtime library enhancements
|
||||||
"Boost 1.44.0
|
"Boost 1.44.0
|
||||||
COMPONENTS system filesystem unit_test_framework regex REQUIRED")
|
COMPONENTS system filesystem unit_test_framework regex REQUIRED")
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ License: GPL-3.0
|
|||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Url: http://www.opm-project.org/
|
Url: http://www.opm-project.org/
|
||||||
Source0: https://github.com/OPM/%{name}/archive/release/%{version}/%{tag}.tar.gz#/%{name}-%{version}.tar.gz
|
Source0: https://github.com/OPM/%{name}/archive/release/%{version}/%{tag}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
BuildRequires: git doxygen bc devtoolset-6-toolchain ecl-devel openmpi-devel mpich-devel zlib-devel
|
BuildRequires: git doxygen bc devtoolset-6-toolchain openmpi-devel mpich-devel
|
||||||
%{?el6:BuildRequires: cmake3 boost148-devel}
|
%{?el6:BuildRequires: cmake3 boost148-devel}
|
||||||
%{!?el6:BuildRequires: cmake boost-devel}
|
%{!?el6:BuildRequires: cmake boost-devel}
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|||||||
Reference in New Issue
Block a user