Commit 15441ada9881da2d14b57fa1471f642c311c012d
1 parent
a7b63368
Exists in
master
and in
56 other branches
Only using compiling with openmp on Linux
Showing
1 changed file
with
16 additions
and
7 deletions
Show diff stats
setup.py
| ... | ... | @@ -2,12 +2,21 @@ from distutils.core import setup |
| 2 | 2 | from distutils.extension import Extension |
| 3 | 3 | from Cython.Distutils import build_ext |
| 4 | 4 | |
| 5 | +import sys | |
| 6 | + | |
| 5 | 7 | import numpy |
| 6 | 8 | |
| 7 | -setup( | |
| 8 | - cmdclass = {'build_ext': build_ext}, | |
| 9 | - ext_modules = [ Extension("invesalius/data/mips", ["invesalius/data/mips.pyx"], | |
| 10 | - include_dirs = [numpy.get_include()], | |
| 11 | - extra_compile_args=['-fopenmp'], | |
| 12 | - extra_link_args=['-fopenmp'],)] | |
| 13 | - ) | |
| 9 | +if sys.platform == 'linux2': | |
| 10 | + setup( | |
| 11 | + cmdclass = {'build_ext': build_ext}, | |
| 12 | + ext_modules = [ Extension("invesalius.data.mips", ["invesalius/data/mips.pyx"], | |
| 13 | + include_dirs = [numpy.get_include()], | |
| 14 | + extra_compile_args=['-fopenmp'], | |
| 15 | + extra_link_args=['-fopenmp'],)] | |
| 16 | + ) | |
| 17 | +else: | |
| 18 | + setup( | |
| 19 | + cmdclass = {'build_ext': build_ext}, | |
| 20 | + ext_modules = [ Extension("invesalius.data.mips", ["invesalius/data/mips.pyx"], | |
| 21 | + include_dirs = [numpy.get_include()],)] | |
| 22 | + ) | ... | ... |