From b216d9dcb7c67c3d62775cae7c2b6535595ba14b Mon Sep 17 00:00:00 2001
From: Oliver Heidmann <oliver.heidmann@mpimet.mpg.de>
Date: Mon, 17 Feb 2025 11:17:44 +0100
Subject: [PATCH] added pthread to CMakeLists.txt

---
 CMakeLists.txt | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8ff5f0870..9ae28f133 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,13 @@ include(CTest)
 include(CheckIncludeFile)
 
 
+# Finding libraries
+### -------------- Pthread ---------------------------
+message("Start check for pthread")
+include(FindThreads)
+find_package(Threads REQUIRED)
+set_target_properties(Threads::Threads PROPERTIES THREADS_PREFER_PTHREAD_FLAG TRUE)
+list(APPEND cdi_compile_defs HAVE_PTHREAD=1)
 
 # enable default internal libs
 list(APPEND cdi_compile_defs
-- 
GitLab