Skip to content

Commit 868e05d

Browse files
committed
fix nsga2
1 parent 577a11c commit 868e05d

File tree

1 file changed

+29
-32
lines changed

1 file changed

+29
-32
lines changed

pyoptsparse/pyNSGA2/meson.build

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,33 @@
11
swig = find_program('swig', required: true)
22

33
nsga2_source = custom_target('nsga2_wrap.c',
4-
input : ['source/swig/nsga2.i'],
5-
output : ['nsga2_wrap.c'],
6-
command: ['swig', '-o', 'pyoptsparse/pyNSGA2/nsga2_wrap.c', '-python', '-interface', 'nsga2', '@INPUT@']
7-
)
4+
input : ['source/swig/nsga2.i'],
5+
output : ['nsga2_wrap.c'],
6+
command: ['swig', '-o', 'pyoptsparse/pyNSGA2/nsga2_wrap.c', '-python', '-interface', 'nsga2', '@INPUT@']
7+
)
88

9-
py3.extension_module('nsga2',
10-
'source/allocate.c',
11-
'source/auxiliary.c',
12-
'source/crossover.c',
13-
'source/crowddist.c',
14-
'source/decode.c',
15-
'source/dominance.c',
16-
'source/eval.c',
17-
'source/fillnds.c',
18-
'source/initialize.c',
19-
'source/list.c',
20-
'source/merge.c',
21-
'source/mutation.c',
22-
'source/nsga2.c',
23-
'source/rand.c',
24-
'source/rank.c',
25-
'source/report.c',
26-
'source/sort.c',
27-
'source/tourselect.c',
28-
nsga2_source,
29-
include_directories: 'source',
30-
dependencies : py3_dep,
31-
subdir: 'pyoptsparse/pyNSGA2',
32-
link_language: 'c',
33-
install: true)
34-
else
35-
message('SWIG was not found, therefore NSGA2 will not be built.')
36-
endif
9+
py3.extension_module('nsga2',
10+
'source/allocate.c',
11+
'source/auxiliary.c',
12+
'source/crossover.c',
13+
'source/crowddist.c',
14+
'source/decode.c',
15+
'source/dominance.c',
16+
'source/eval.c',
17+
'source/fillnds.c',
18+
'source/initialize.c',
19+
'source/list.c',
20+
'source/merge.c',
21+
'source/mutation.c',
22+
'source/nsga2.c',
23+
'source/rand.c',
24+
'source/rank.c',
25+
'source/report.c',
26+
'source/sort.c',
27+
'source/tourselect.c',
28+
nsga2_source,
29+
include_directories: 'source',
30+
dependencies : py3_dep,
31+
subdir: 'pyoptsparse/pyNSGA2',
32+
link_language: 'c',
33+
install: true)

0 commit comments

Comments
 (0)