From d68fe56c0c25e5fddb9d3048d48ea9cb46affbcf Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Thu, 26 Sep 2024 19:24:27 +0200
Subject: [PATCH] [cmake] Bump pybind11 to 2.13.2 to get gcc 14 fix.

https://github.com/pybind/pybind11/issues/5206
---
 scripts/cmake/Dependencies.cmake | 12 ++++++++----
 web/data/versions.json           |  2 +-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/scripts/cmake/Dependencies.cmake b/scripts/cmake/Dependencies.cmake
index 686b384af8b..f63dafc6b6a 100644
--- a/scripts/cmake/Dependencies.cmake
+++ b/scripts/cmake/Dependencies.cmake
@@ -83,10 +83,14 @@ else()
     list(APPEND DISABLE_WARNINGS_TARGETS tet tetgen)
 endif()
 
-CPMFindPackage(
-    NAME pybind11 GITHUB_REPOSITORY pybind/pybind11
-    VERSION ${ogs.minimum_version.pybind11} SYSTEM TRUE
-)
+if(GUIX_BUILD)
+    find_package(pybind11 REQUIRED)
+else()
+    CPMFindPackage(
+        NAME pybind11 GITHUB_REPOSITORY pybind/pybind11
+        VERSION ${ogs.minimum_version.pybind11} SYSTEM TRUE
+    )
+endif()
 
 if(_build_chemistry_lib)
     if(GUIX_BUILD)
diff --git a/web/data/versions.json b/web/data/versions.json
index 4f2e0964142..f19856d7b2a 100644
--- a/web/data/versions.json
+++ b/web/data/versions.json
@@ -25,7 +25,7 @@
     "tfel-repo": "thelfer",
     "lis": "1.7.37",
     "gtest": "1.13.0",
-    "pybind11": "2.10.4",
+    "pybind11": "2.13.2",
     "range-v3": "0.12.0",
     "json": "3.10.5",
     "json_sha": "b94997df68856753b72f0d7a3703b7d484d4745c567f3584ef97c96c25a5798e"
-- 
GitLab