Commit 4f679b6b1b64ab37ae3e539bbb194bda2dafb083
1 parent
a5cc86d0
Exists in
master
using clang to compile with openmp in mac
Showing
1 changed file
with
9 additions
and
9 deletions
Show diff stats
setup.py
| ... | ... | @@ -64,24 +64,24 @@ elif sys.platform == 'win32': |
| 64 | 64 | ]) |
| 65 | 65 | ) |
| 66 | 66 | |
| 67 | -else: | |
| 67 | +elif sys.platform == 'darwin': | |
| 68 | 68 | setup( |
| 69 | 69 | packages=["invesalius", ], |
| 70 | 70 | cmdclass = {'build_ext': build_ext}, |
| 71 | 71 | ext_modules = cythonize([Extension("invesalius.data.mips", ["invesalius/data/mips.pyx"], |
| 72 | 72 | include_dirs = [numpy.get_include()], |
| 73 | - extra_compile_args=['-fopenmp',], | |
| 74 | - extra_link_args=['-fopenmp',]), | |
| 73 | + extra_compile_args=['-Xpreprocessor', '-fopenmp', '-lomp'], | |
| 74 | + extra_link_args=['-Xpreprocessor', '-fopenmp', '-lomp']), | |
| 75 | 75 | |
| 76 | 76 | Extension("invesalius.data.interpolation", ["invesalius/data/interpolation.pyx"], |
| 77 | 77 | include_dirs=[numpy.get_include()], |
| 78 | - extra_compile_args=['-fopenmp',], | |
| 79 | - extra_link_args=['-fopenmp',]), | |
| 78 | + extra_compile_args=['-Xpreprocessor', '-fopenmp', '-lomp'], | |
| 79 | + extra_link_args=['-Xpreprocessor', '-fopenmp', '-lomp']), | |
| 80 | 80 | |
| 81 | 81 | Extension("invesalius.data.transforms", ["invesalius/data/transforms.pyx"], |
| 82 | 82 | include_dirs=[numpy.get_include()], |
| 83 | - extra_compile_args=['-fopenmp',], | |
| 84 | - extra_link_args=['-fopenmp',]), | |
| 83 | + extra_compile_args=['-Xpreprocessor', '-fopenmp', '-lomp'], | |
| 84 | + extra_link_args=['-Xpreprocessor', '-fopenmp', '-lomp']), | |
| 85 | 85 | |
| 86 | 86 | Extension("invesalius.data.floodfill", ["invesalius/data/floodfill.pyx"], |
| 87 | 87 | include_dirs=[numpy.get_include()], |
| ... | ... | @@ -89,8 +89,8 @@ else: |
| 89 | 89 | |
| 90 | 90 | Extension("invesalius.data.cy_mesh", ["invesalius/data/cy_mesh.pyx"], |
| 91 | 91 | include_dirs=[numpy.get_include()], |
| 92 | - extra_compile_args=['-fopenmp', '-std=c++11'], | |
| 93 | - extra_link_args=['-fopenmp', '-std=c++11'], | |
| 92 | + extra_compile_args=['-Xpreprocessor', '-fopenmp', '-lomp'], | |
| 93 | + extra_link_args=['-Xpreprocessor', '-fopenmp', '-lomp'], | |
| 94 | 94 | language='c++',), |
| 95 | 95 | |
| 96 | 96 | ]) | ... | ... |