File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929BUILD_DOCS = os .getenv ('BUILD_DOCS' , '0' ) == '1'
3030
3131
32+ def get_openmp_flag ():
33+ if os .getenv ("OPENMP_FLAG" ) is not None :
34+ return os .getenv ("OPENMP_FLAG" )
35+ if sys .platform == 'win32' :
36+ return '/openmp'
37+ else :
38+ return '-fopenmp'
39+
40+
3241def get_extensions ():
3342 extensions = []
3443
@@ -52,11 +61,8 @@ def get_extensions():
5261 info = parallel_info ()
5362 if ('backend: OpenMP' in info and 'OpenMP not found' not in info
5463 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' ]
64+ extra_compile_args ['cxx' ] += ['-DAT_PARALLEL_OPENMP' ,
65+ get_openmp_flag ()]
6066 else :
6167 print ('Compiling without OpenMP...' )
6268
You can’t perform that action at this time.
0 commit comments