parent
ed5528ba18
commit
a51036fd7d
5 changed files with 58 additions and 13 deletions
@ -0,0 +1,2 @@ |
||||
#mesondefine ONE |
||||
#mesondefine ZERO |
@ -0,0 +1,12 @@ |
||||
project('set10test', 'c') |
||||
|
||||
conf = configuration_data() |
||||
conf.set10('ONE', true) |
||||
conf.set10('ZERO', false) |
||||
|
||||
configure_file(input : 'config.h.in', |
||||
output : 'config.h', |
||||
configuration : conf) |
||||
|
||||
exe = executable('prog', 'prog.c', include_dirs : include_directories('.')) |
||||
test('10test', exe) |
@ -0,0 +1,13 @@ |
||||
#include<stdio.h> |
||||
#include"config.h" |
||||
|
||||
int main(int argc, char **argv) { |
||||
if(ONE != 1) { |
||||
fprintf(stderr, "ONE is not 1.\n"); |
||||
return 1; |
||||
} |
||||
if(ZERO != 0) { |
||||
fprintf(stderr, "ZERO is not 0.\n"); |
||||
} |
||||
return 0; |
||||
} |
Loading…
Reference in new issue