From 1ca5efb279681f4d36fb418c99c96082a201166f Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Thu, 14 Mar 2024 10:02:33 +0100
Subject: [PATCH] [cmake] Remove find_package(Threads).

---
 Applications/DataExplorer/DataExplorer.cmake | 1 -
 Tests/CMakeLists.txt                         | 1 -
 scripts/cmake/Find.cmake                     | 5 -----
 3 files changed, 7 deletions(-)

diff --git a/Applications/DataExplorer/DataExplorer.cmake b/Applications/DataExplorer/DataExplorer.cmake
index dd6bbd50201..840c075da90 100644
--- a/Applications/DataExplorer/DataExplorer.cmake
+++ b/Applications/DataExplorer/DataExplorer.cmake
@@ -34,7 +34,6 @@ target_link_libraries(
     QtDataView
     QtDiagramView
     VtkVis
-    $<$<TARGET_EXISTS:Threads::Threads>:Threads::Threads>
     Qt5::Core
     Qt5::Gui
     Qt5::Widgets
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 011147d115c..50612e4d7ff 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -112,7 +112,6 @@ target_link_libraries(
             VTK::FiltersSources
             Boost::boost # TODO move OGSMFrontThermodynamicForcesView to
                          # MathLib?
-            $<$<TARGET_EXISTS:Threads::Threads>:Threads::Threads>
             $<$<TARGET_EXISTS:LIE>:LIE>
             $<$<TARGET_EXISTS:TH2M>:TH2M>
             $<$<TARGET_EXISTS:MPI::MPI_CXX>:MPI::MPI_CXX>
diff --git a/scripts/cmake/Find.cmake b/scripts/cmake/Find.cmake
index 71d4b584912..ba434da7d4e 100644
--- a/scripts/cmake/Find.cmake
+++ b/scripts/cmake/Find.cmake
@@ -43,11 +43,6 @@ endif()
 # ##############################################################################
 # Find libraries
 # ##############################################################################
-if(OGS_USE_MFRONT)
-    set(CMAKE_REQUIRE_FIND_PACKAGE_Threads TRUE)
-    set(THREADS_PREFER_PTHREAD_FLAG ON)
-endif()
-find_package(Threads)
 
 # Qt5 library ##
 if(OGS_BUILD_GUI)
-- 
GitLab