File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,21 @@ def get_include(): # TODO
1818def __extra_compile_args ():
1919 extra_compile_args = []
2020 print ("Platform is " + platform .system ())
21- if platform .system () == 'darwin' or 'macOS' :
21+
22+ if platform .system () == 'Darwin' :
2223 extra_compile_args = ["-std=c++11" ]
2324 else :
2425 extra_compile_args = ["-fopenmp" , "-std=c++11" ]
2526 return extra_compile_args
2627
2728
29+ def __extra_link_args ():
30+ extra_link_args = []
31+ if platform .system () != 'Darwin' :
32+ extra_link_args = ["-lgomp" , "-lm" , "-lrt" ]
33+ return extra_link_args
34+
35+
2836sources_list = ['src/krbalancing.cpp' ]
2937
3038kr_module = Extension ('krbalancing' ,
@@ -33,7 +41,7 @@ def __extra_compile_args():
3341 # Path to eigen3 headers
3442 get_include ()
3543 ],
36- extra_link_args = [ "-lgomp" , "-lm" , "-lrt" ] ,
44+ extra_link_args = __extra_link_args () ,
3745 extra_compile_args = __extra_compile_args ()
3846 )
3947
You can’t perform that action at this time.
0 commit comments