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()
|