summaryrefslogtreecommitdiff
path: root/tools/build/example/pch
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-08-05 19:32:57 +0000
committer <>2014-10-07 10:01:33 +0000
commit1c3648bf5b7d17fcd4fe9bc95802b16fd9eee304 (patch)
tree03de66686a262696ec2ac408e62250dc1f0c01aa /tools/build/example/pch
parent8c4528713d907ee2cfd3bfcbbad272c749867f84 (diff)
downloadboost-tarball-1c3648bf5b7d17fcd4fe9bc95802b16fd9eee304.tar.gz
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_56_0.tar.bz2.boost_1_56_0
Diffstat (limited to 'tools/build/example/pch')
-rw-r--r--tools/build/example/pch/include/pch.hpp19
-rw-r--r--tools/build/example/pch/jamroot.jam29
-rw-r--r--tools/build/example/pch/source/hello_world.cpp15
3 files changed, 63 insertions, 0 deletions
diff --git a/tools/build/example/pch/include/pch.hpp b/tools/build/example/pch/include/pch.hpp
new file mode 100644
index 000000000..8f05cc43d
--- /dev/null
+++ b/tools/build/example/pch/include/pch.hpp
@@ -0,0 +1,19 @@
+/* Copyright 2006 Vladimir Prus
+
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+#ifdef BOOST_BUILD_PCH_ENABLED
+
+#ifdef FOO2
+int bar();
+#endif
+
+class TestClass {
+public:
+ TestClass(int, int) {}
+};
+
+#endif
diff --git a/tools/build/example/pch/jamroot.jam b/tools/build/example/pch/jamroot.jam
new file mode 100644
index 000000000..115164aae
--- /dev/null
+++ b/tools/build/example/pch/jamroot.jam
@@ -0,0 +1,29 @@
+# Copyright 2006 Ilya Sokolov
+#
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# pch ##########################################################################
+
+import pch ;
+
+cpp-pch pch
+ : # sources
+ include/pch.hpp
+ : # requirements
+ <include>include
+ ;
+explicit pch ;
+
+# exe ##########################################################################
+
+exe hello_world
+ : # sources
+ pch
+ source/hello_world.cpp
+ : # requirements
+ <include>include
+ : # default build
+ : # usage requirements
+ ;
diff --git a/tools/build/example/pch/source/hello_world.cpp b/tools/build/example/pch/source/hello_world.cpp
new file mode 100644
index 000000000..f618056a0
--- /dev/null
+++ b/tools/build/example/pch/source/hello_world.cpp
@@ -0,0 +1,15 @@
+/* Copyright 2006 Ilya Sokolov
+ Copyright 2006 Vladimir Prus
+
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+#include <pch.hpp>
+
+int main()
+{
+ TestClass c(1, 2);
+ return 0;
+}