File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 1
1
from setuptools .command .build_ext import build_ext
2
2
from distutils .core import setup , Extension
3
+ import platform
3
4
import sys
4
5
from sysconfig import get_config_var , get_paths
5
6
import logging
@@ -14,6 +15,15 @@ def get_include(): # TODO
14
15
return Eigen_path
15
16
16
17
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
+
17
27
sources_list = ['src/krbalancing.cpp' ]
18
28
19
29
kr_module = Extension ('krbalancing' ,
@@ -23,7 +33,7 @@ def get_include(): # TODO
23
33
get_include ()
24
34
],
25
35
extra_link_args = ["-lgomp" , "-lm" , "-lrt" ],
26
- extra_compile_args = [ "-fopenmp" , "-std=c++11" ]
36
+ extra_compile_args = __extra_compile_args ()
27
37
)
28
38
29
39
You can’t perform that action at this time.
0 commit comments