Skip to content

Commit 55a6b8a

Browse files
committed
fix race condition in meson build
1 parent 39ab9b2 commit 55a6b8a

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

meson.build

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ src_file = generator(
9696
)
9797

9898
gen_loops_c = src_file.process('mkl_umath/src/mkl_umath_loops.c.src')
99-
gen_loops_h = src_file.process('mkl_umath/src/mkl_umath_loops.h.src')
10099

101100
gen_umath_c = custom_target(
102101
'__umath_generated',
@@ -105,6 +104,14 @@ gen_umath_c = custom_target(
105104
command: [py, '@INPUT@', '-o', '@OUTPUT@']
106105
)
107106

107+
gen_loops_h = custom_target(
108+
'mkl_umath_loops_h',
109+
output: ['mkl_umath_loops.h'],
110+
input: 'mkl_umath/src/mkl_umath_loops.h.src',
111+
command: [src_file_cli, '@INPUT@', '-o', '@OUTPUT@'],
112+
depends: gen_umath_c
113+
)
114+
108115
mkl_umath_loops = shared_library(
109116
'mkl_umath_loops',
110117
sources: [gen_loops_c, gen_loops_h],
@@ -128,7 +135,7 @@ endif
128135
# gen_loops_h is generated by custom target so must be included in sources
129136
py.extension_module(
130137
'_ufuncs',
131-
sources: ['mkl_umath/src/ufuncsmodule.c', gen_umath_c, gen_loops_h],
138+
sources: ['mkl_umath/src/ufuncsmodule.c', gen_loops_h],
132139
include_directories: inc_np,
133140
dependencies: [mkl_dep, loops_dep],
134141
c_args: c_args + ['-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION'],

0 commit comments

Comments
 (0)