Skip to content
Snippets Groups Projects
Commit 1f8b7d9b authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

[cornerpoint] add patch for opm-common

See https://github.com/OPM/opm-common/pull/302. Can be removed if
cherry-picked to OPM's 2018.04 release branch.
parent f56fc571
No related branches found
No related tags found
1 merge request!1011Feature/support cpgrid
...@@ -5,9 +5,8 @@ ...@@ -5,9 +5,8 @@
patch -p1 <../dumux/patches/istl-2.4.1.patch patch -p1 <../dumux/patches/istl-2.4.1.patch
- If opm-grid has to be used for, e.g., employing the CpGridCreator, - If opm-grid has to be used for, e.g., employing the CpGridCreator,
and Opm is compiled from source, it is necessary to patch opm-grid: and Opm is compiled from source, it is necessary to patch opm-common and
opm-grid, namely, to execute in the corresponding folders:
patch -p1 <../dumux/patches/opm-common-2018.04.patch
patch -p1 <../dumux/patches/opm-grid-2018.04.patch patch -p1 <../dumux/patches/opm-grid-2018.04.patch
In addition, it might be necessary to set manually a CMake variable in the
CMAKE_FLAGS section of the .opts-file:
-DHAVE_OPM_GRID=1 \
Currently, Dumux is supposed to be compatible with the Opm 2018.04 release. Currently, Dumux is supposed to be compatible with the Opm 2018.04 release.
diff --git a/cmake/Modules/OpmProject.cmake b/cmake/Modules/OpmProject.cmake
index 51d572df..68feda08 100644
--- a/cmake/Modules/OpmProject.cmake
+++ b/cmake/Modules/OpmProject.cmake
@@ -76,6 +76,7 @@ function (opm_cmake_config name)
set (template_dir "${OPM_MACROS_ROOT}/cmake/Templates")
# write configuration file to locate library
+ set(DUNE_PREFIX ${PROJECT_SOURCE_DIR})
set(OPM_PROJECT_EXTRA_CODE ${OPM_PROJECT_EXTRA_CODE_INTREE})
set(PREREQ_LOCATION "${PROJECT_SOURCE_DIR}")
configure_cmake_file (${name} "config" "")
@@ -123,6 +124,7 @@ function (opm_cmake_config name)
# of the build directory (using the same input template)
set(OPM_PROJECT_EXTRA_CODE ${OPM_PROJECT_EXTRA_CODE_INSTALLED})
set(PREREQ_LOCATION "${CMAKE_INSTALL_PREFIX}/share/opm/cmake/Modules")
+ set(DUNE_PREFIX ${CMAKE_INSTALL_PREFIX})
configure_cmake_file (${name} "install" "")
configure_vars (
FILE CMAKE "${PROJECT_BINARY_DIR}/${${name}_NAME}-install.cmake"
diff --git a/cmake/Templates/opm-project-config.cmake.in b/cmake/Templates/opm-project-config.cmake.in
index 421708a8..a783043d 100644
--- a/cmake/Templates/opm-project-config.cmake.in
+++ b/cmake/Templates/opm-project-config.cmake.in
@@ -24,6 +24,7 @@ if(NOT @opm-project_NAME@_FOUND)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" @PREREQ_LOCATION@)
include(@opm-project_NAME@-prereqs)
# propagate these properties from one build system to the other
+ set (@opm-project_NAME@_PREFIX "@DUNE_PREFIX@")
set (@opm-project_NAME@_VERSION "@opm-project_VERSION@")
set (@opm-project_NAME@_DEFINITIONS "@opm-project_DEFINITIONS@")
set (@opm-project_NAME@_INCLUDE_DIRS "@opm-project_INCLUDE_DIRS@")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment