mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-03 05:04:09 +03:00
make openmp on windows optional
This commit is contained in:
parent
6df3858dbc
commit
5f699883dd
6
setup.py
6
setup.py
|
@ -72,7 +72,7 @@ MOD_NAMES = [
|
||||||
# which is really known only after finalize_options
|
# which is really known only after finalize_options
|
||||||
# http://stackoverflow.com/questions/724664/python-distutils-how-to-get-a-compiler-that-is-going-to-be-used
|
# http://stackoverflow.com/questions/724664/python-distutils-how-to-get-a-compiler-that-is-going-to-be-used
|
||||||
compile_options = {
|
compile_options = {
|
||||||
'msvc': ['/Ox', '/EHsc', '/openmp'],
|
'msvc': ['/Ox', '/EHsc'],
|
||||||
'mingw32' : ['-O3', '-Wno-strict-prototypes', '-Wno-unused-function'],
|
'mingw32' : ['-O3', '-Wno-strict-prototypes', '-Wno-unused-function'],
|
||||||
'other' : ['-O3', '-Wno-strict-prototypes', '-Wno-unused-function']
|
'other' : ['-O3', '-Wno-strict-prototypes', '-Wno-unused-function']
|
||||||
}
|
}
|
||||||
|
@ -85,6 +85,10 @@ link_options = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if os.environ.get('USE_OPENMP') == '1':
|
||||||
|
compile_options['msvc'].append('/openmp')
|
||||||
|
|
||||||
|
|
||||||
if not sys.platform.startswith('darwin'):
|
if not sys.platform.startswith('darwin'):
|
||||||
compile_options['other'].append('-fopenmp')
|
compile_options['other'].append('-fopenmp')
|
||||||
link_options['other'].append('-fopenmp')
|
link_options['other'].append('-fopenmp')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user