parent
18ad46d6ef
commit
73f8a69d39
6 changed files with 24 additions and 1 deletions
@ -1,3 +1,3 @@ |
||||
project('c++ pch test', 'c++') |
||||
exe = executable('prog', 'prog.cc') |
||||
exe.pch('pch/prog.hh') |
||||
exe.pch('pch/prog.hh') |
||||
|
@ -0,0 +1,4 @@ |
||||
project('mixed C and C++ pch test', 'c++', 'c') |
||||
|
||||
exe = executable('prog', 'main.cc', 'func.c') |
||||
exe.pch('pch/main.hh', 'pch/func.h') |
@ -0,0 +1,7 @@ |
||||
void tmp_func() { |
||||
fprintf(stdout, "This is a function that fails if stdio is not #included.\n"); |
||||
} |
||||
|
||||
int cfunc() { |
||||
return 0; |
||||
} |
@ -0,0 +1,10 @@ |
||||
extern "C" int cfunc(); |
||||
|
||||
void func() { |
||||
std::cout << "This is a function that fails to compile if iostream is not included." |
||||
<< std::endl; |
||||
} |
||||
|
||||
int main(int argc, char **argv) { |
||||
return cfunc(); |
||||
} |
@ -0,0 +1 @@ |
||||
#include<stdio.h> |
@ -0,0 +1 @@ |
||||
#include<iostream> |
Loading…
Reference in new issue