Skip to content

Commit 04c778f

Browse files
authored
Merge pull request #6 from deeptools/develop
removed openmp for MAC OS
2 parents ca09e95 + 197dbb6 commit 04c778f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

setup.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from setuptools.command.build_ext import build_ext
22
from distutils.core import setup, Extension
3+
import platform
34
import sys
45
from sysconfig import get_config_var, get_paths
56
import logging
@@ -14,6 +15,15 @@ def get_include(): # TODO
1415
return Eigen_path
1516

1617

18+
def __extra_compile_args():
19+
extra_compile_args = []
20+
if platform.system() == 'Darwin':
21+
extra_compile_args = ["-std=c++11"]
22+
else:
23+
extra_compile_args = ["-fopenmp", "-std=c++11"]
24+
return extra_compile_args
25+
26+
1727
sources_list = ['src/krbalancing.cpp']
1828

1929
kr_module = Extension('krbalancing',
@@ -23,7 +33,7 @@ def get_include(): # TODO
2333
get_include()
2434
],
2535
extra_link_args=["-lgomp", "-lm", "-lrt"],
26-
extra_compile_args=["-fopenmp", "-std=c++11"]
36+
extra_compile_args=__extra_compile_args()
2737
)
2838

2939

0 commit comments

Comments
 (0)