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 11from setuptools .command .build_ext import build_ext
22from distutils .core import setup , Extension
3+ import platform
34import sys
45from sysconfig import get_config_var , get_paths
56import 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+
1727sources_list = ['src/krbalancing.cpp' ]
1828
1929kr_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
You can’t perform that action at this time.
0 commit comments