Added a extract_all_objects method to make recombining targets easier. Fixes #205.
parent
1910b1eb48
commit
0e508bf818
9 changed files with 57 additions and 2 deletions
@ -0,0 +1,6 @@ |
||||
#pragma once |
||||
|
||||
int func1(); |
||||
int func2(); |
||||
int func3(); |
||||
int func4(); |
@ -0,0 +1,5 @@ |
||||
#include"extractor.h" |
||||
|
||||
int func4() { |
||||
return 4; |
||||
} |
@ -0,0 +1,9 @@ |
||||
project('extract all', 'c') |
||||
|
||||
a = static_library('a', 'one.c', 'two.c') |
||||
b = static_library('b', 'three.c', 'four.c') |
||||
c = static_library('c', |
||||
objects : [a.extract_all_objects(), b.extract_all_objects()]) |
||||
|
||||
e = executable('proggie', 'prog.c', link_with : c) |
||||
test('extall', e) |
@ -0,0 +1,5 @@ |
||||
#include"extractor.h" |
||||
|
||||
int func1() { |
||||
return 1; |
||||
} |
@ -0,0 +1,10 @@ |
||||
#include"extractor.h" |
||||
#include<stdio.h> |
||||
|
||||
int main(int argc, char **argv) { |
||||
if((1+2+3+4) != (func1() + func2() + func3() + func4())) { |
||||
printf("Arithmetic is fail.\n"); |
||||
return 1; |
||||
} |
||||
return 0; |
||||
} |
@ -0,0 +1,5 @@ |
||||
#include"extractor.h" |
||||
|
||||
int func3() { |
||||
return 3; |
||||
} |
@ -0,0 +1,5 @@ |
||||
#include"extractor.h" |
||||
|
||||
int func2() { |
||||
return 2; |
||||
} |
Loading…
Reference in new issue