File tree Expand file tree Collapse file tree 3 files changed +27
-7
lines changed
test cases/unit/15 prebuilt object Expand file tree Collapse file tree 3 files changed +27
-7
lines changed Original file line number Diff line number Diff line change @@ -191,11 +191,11 @@ kwargs:
191
191
(but *not* before that). On Windows, this argument has no effect.
192
192
193
193
objects :
194
- type : list[extracted_obj]
194
+ type : list[extracted_obj | file | str ]
195
195
description : |
196
- List of prebuilt object files (usually for third party
197
- products you don't have source to) that should be linked in this
198
- target, **never** use this for object files that you build yourself .
196
+ List of object files that should be linked in this target.
197
+ These can include third party products you don't have source to,
198
+ or object files produced by other build targets .
199
199
200
200
name_prefix :
201
201
type : str | list[void]
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env python3
2
+
3
+ import sys
4
+ from shutil import copyfile
5
+ copyfile (* sys .argv [1 :])
Original file line number Diff line number Diff line change 19
19
# declaration. run_tests.py generates the
20
20
# prebuilt object before running this test.
21
21
22
- e = executable (' prog' , ' main.c' ,
23
- objects : prebuilt)
22
+ e = []
24
23
25
- test (' objtest' , e)
24
+ e += executable (' exe1' , sources : ' main.c' , objects : prebuilt)
25
+ e += executable (' exe2' , sources : ' main.c' , objects : files (prebuilt))
26
+
27
+ sl1 = static_library (' lib3' , objects : prebuilt)
28
+ e += executable (' exe3' , sources : ' main.c' , objects : sl1.extract_all_objects(recursive : true ))
29
+
30
+ ct = custom_target (output : ' copy-' + prebuilt, input : prebuilt,
31
+ command : [find_program (' cp.py' ), ' @INPUT@' , ' @OUTPUT@' ])
32
+ e += executable (' exe4' , ' main.c' , ct)
33
+ e += executable (' exe5' , ' main.c' , ct[0 ])
34
+
35
+ sl2 = static_library (' lib6' , sources : ct)
36
+ e += executable (' exe6' , sources : ' main.c' , objects : sl2.extract_all_objects(recursive : true ))
37
+
38
+ foreach i : e
39
+ test (i.name(), i)
40
+ endforeach
You can’t perform that action at this time.
0 commit comments