aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-01-13 21:01:53 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2013-01-13 21:01:53 +0200
commit18ad46d6efe732a2643df8186e2a1befd1748d35 (patch)
tree05821035d92e0f2aafc31f4e3a7a144aac7bb114
parent3e9416fc4ae7f37f3a4f07c8402a95705fa176ad (diff)
downloadmeson-18ad46d6efe732a2643df8186e2a1befd1748d35.zip
meson-18ad46d6efe732a2643df8186e2a1befd1748d35.tar.gz
meson-18ad46d6efe732a2643df8186e2a1befd1748d35.tar.bz2
Test for C++ pch.
-rw-r--r--test cases/14 cxx pch/builder.txt3
-rw-r--r--test cases/14 cxx pch/pch/prog.hh1
-rw-r--r--test cases/14 cxx pch/prog.cc8
3 files changed, 12 insertions, 0 deletions
diff --git a/test cases/14 cxx pch/builder.txt b/test cases/14 cxx pch/builder.txt
new file mode 100644
index 0000000..8d27a17
--- /dev/null
+++ b/test cases/14 cxx pch/builder.txt
@@ -0,0 +1,3 @@
+project('c++ pch test', 'c++')
+exe = executable('prog', 'prog.cc')
+exe.pch('pch/prog.hh') \ No newline at end of file
diff --git a/test cases/14 cxx pch/pch/prog.hh b/test cases/14 cxx pch/pch/prog.hh
new file mode 100644
index 0000000..751cc4a
--- /dev/null
+++ b/test cases/14 cxx pch/pch/prog.hh
@@ -0,0 +1 @@
+#include<iostream>
diff --git a/test cases/14 cxx pch/prog.cc b/test cases/14 cxx pch/prog.cc
new file mode 100644
index 0000000..629d880
--- /dev/null
+++ b/test cases/14 cxx pch/prog.cc
@@ -0,0 +1,8 @@
+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 0;
+}