File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828
2929BUILD_DOCS = os .getenv ('BUILD_DOCS' , '0' ) == '1'
3030
31+ def get_openmp_flag ():
32+ if os .getenv ("OPENMP_FLAG" ) is not None :
33+ return os .getenv ("OPENMP_FLAG" )
34+ if sys .platform == 'win32' :
35+ return ['/openmp' ]
36+ else :
37+ return ['-fopenmp' ]
38+
3139
3240def get_extensions ():
3341 extensions = []
@@ -52,11 +60,7 @@ def get_extensions():
5260 info = parallel_info ()
5361 if ('backend: OpenMP' in info and 'OpenMP not found' not in info
5462 and sys .platform != 'darwin' ):
55- extra_compile_args ['cxx' ] += ['-DAT_PARALLEL_OPENMP' ]
56- if sys .platform == 'win32' :
57- extra_compile_args ['cxx' ] += ['/openmp' ]
58- else :
59- extra_compile_args ['cxx' ] += ['-fopenmp' ]
63+ extra_compile_args ['cxx' ] += ['-DAT_PARALLEL_OPENMP' , get_openmp_flag ()]
6064 else :
6165 print ('Compiling without OpenMP...' )
6266
You can’t perform that action at this time.
0 commit comments