parent
211a60dc99
commit
f1b32aa4bb
6 changed files with 38 additions and 14 deletions
@ -0,0 +1,2 @@ |
||||
exe = executable('prog', 'prog.c', |
||||
c_pch : ['pch/prog_pch.c', 'pch/prog.h']) |
@ -0,0 +1 @@ |
||||
#include<stdio.h> |
@ -0,0 +1,5 @@ |
||||
#if !defined(_MSC_VER) |
||||
#error "This file is only for use with MSVC." |
||||
#endif |
||||
|
||||
#include "prog.h" |
@ -0,0 +1,10 @@ |
||||
// No includes here, they need to come from the PCH
|
||||
|
||||
void func() { |
||||
fprintf(stdout, "This is a function that fails if stdio is not #included.\n"); |
||||
} |
||||
|
||||
int main(int argc, char **argv) { |
||||
return 0; |
||||
} |
||||
|
@ -0,0 +1,5 @@ |
||||
# Disable PCH usage to make sure backends respect this setting. |
||||
# Since the .c file requires PCH usage (it does not include necessary |
||||
# headers itself), the build should fail. |
||||
project('pch test', 'c', default_options: ['b_pch=false']) |
||||
subdir('c') |
Loading…
Reference in new issue