File: 0012-Workaround-possibly-set-HAVE_DUNE_MODULE-DUNE-2.10.patch

package info (click to toggle)
opm-common 2024.10%2Bds-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 98,420 kB
  • sloc: cpp: 263,013; python: 3,155; sh: 198; xml: 174; pascal: 136; makefile: 12
file content (29 lines) | stat: -rw-r--r-- 1,103 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From: Markus Blatt <markus@dr-blatt.de>
Date: Mon, 9 Sep 2024 17:41:53 +0200
Subject: Workaround possibly set HAVE_DUNE_MODULE (DUNE 2.10).

For 2.10 this is set by the *-config.cmake file to TRUE which
suddenly resulted in
```
```
appearing in config.h. As TRUE is not defined we would pretend that there
is no dune-istl and compilation would fail where we pack BlockVectors
for serialization.
---
 cmake/Modules/OpmPackage.cmake | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cmake/Modules/OpmPackage.cmake b/cmake/Modules/OpmPackage.cmake
index d47e6b2..a8a12e0 100644
--- a/cmake/Modules/OpmPackage.cmake
+++ b/cmake/Modules/OpmPackage.cmake
@@ -136,6 +136,9 @@ macro (find_opm_package module deps header lib defs prog conf)
     # since we don't have any config.h yet
     list (APPEND CMAKE_REQUIRED_DEFINITIONS ${${module}_DEFINITIONS})
     list (APPEND CMAKE_REQUIRED_DEFINITIONS ${${module}_CMD_CONFIG})
+    if(HAVE_${MODULE} STREQUAL "TRUE")
+      set(HAVE_${MODULE} "")
+    endif()
     check_cxx_source_compiles ("${prog}" HAVE_${MODULE})
     cmake_pop_check_state ()
   else()