Added test for mixed C/C++ pch usage.

pull/15/head
Jussi Pakkanen 12 years ago
parent 18ad46d6ef
commit 73f8a69d39
  1. 4
      test cases/15 mixed pch/builder.txt
  2. 7
      test cases/15 mixed pch/func.c
  3. 10
      test cases/15 mixed pch/main.cc
  4. 1
      test cases/15 mixed pch/pch/func.h
  5. 1
      test cases/15 mixed pch/pch/main.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();
}
Loading…
Cancel
Save