diff options
Diffstat (limited to 'meson/test cases/common/13 pch/cpp')
-rw-r--r-- | meson/test cases/common/13 pch/cpp/meson.build | 1 | ||||
-rw-r--r-- | meson/test cases/common/13 pch/cpp/pch/prog.hh | 1 | ||||
-rw-r--r-- | meson/test cases/common/13 pch/cpp/prog.cc | 11 |
3 files changed, 13 insertions, 0 deletions
diff --git a/meson/test cases/common/13 pch/cpp/meson.build b/meson/test cases/common/13 pch/cpp/meson.build new file mode 100644 index 000000000..b01cd58f3 --- /dev/null +++ b/meson/test cases/common/13 pch/cpp/meson.build @@ -0,0 +1 @@ +exe = executable('prog', 'prog.cc', cpp_pch : 'pch/prog.hh') diff --git a/meson/test cases/common/13 pch/cpp/pch/prog.hh b/meson/test cases/common/13 pch/cpp/pch/prog.hh new file mode 100644 index 000000000..751cc4a71 --- /dev/null +++ b/meson/test cases/common/13 pch/cpp/pch/prog.hh @@ -0,0 +1 @@ +#include<iostream> diff --git a/meson/test cases/common/13 pch/cpp/prog.cc b/meson/test cases/common/13 pch/cpp/prog.cc new file mode 100644 index 000000000..0ba8519dc --- /dev/null +++ b/meson/test cases/common/13 pch/cpp/prog.cc @@ -0,0 +1,11 @@ +// Note: if using PGI compilers, you will need to add #include "prog.hh" +// even though you're using precompiled headers. +void func(void) { + std::cout << "This is a function that fails to compile if iostream is not included." + << std::endl; +} + +int main(void) { + func(); + return 0; +} |