From 76bc6d943dbc27e5ce8cc72d9825580269e86ca2 Mon Sep 17 00:00:00 2001
From: David Rafferty <drafferty@hs.uni-hamburg.de>
Date: Wed, 25 Nov 2020 17:08:22 +0100
Subject: [PATCH] Disable OpenMP support on Darwin

---
 setup.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 9bec618..ab7aded 100644
--- a/setup.py
+++ b/setup.py
@@ -60,9 +60,13 @@ class LSMToolDistribution(Distribution):
 class BuildExt(build_ext):
 
     def build_extensions(self):
-        opts = ['-fopenmp', '-std=c++11']
+        opts = ['-std=c++11']
         if sys.platform == 'darwin':
             opts += ['-stdlib=libc++']
+        else:
+            # Enable OpenMP support only on non-Darwin platforms, as clang
+            # does not support it without some work
+            opts += ['-fopenmp']
         for ext in self.extensions:
             ext.extra_compile_args = opts
         build_ext.build_extensions(self)
-- 
GitLab