summaryrefslogtreecommitdiffstats
path: root/src/boost/tools/build/example/pch
diff options
context:
space:
mode:
Diffstat (limited to 'src/boost/tools/build/example/pch')
-rw-r--r--src/boost/tools/build/example/pch/include/pch.hpp19
-rw-r--r--src/boost/tools/build/example/pch/jamroot.jam29
-rw-r--r--src/boost/tools/build/example/pch/source/hello_world.cpp15
3 files changed, 63 insertions, 0 deletions
diff --git a/src/boost/tools/build/example/pch/include/pch.hpp b/src/boost/tools/build/example/pch/include/pch.hpp
new file mode 100644
index 000000000..8f05cc43d
--- /dev/null
+++ b/src/boost/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/src/boost/tools/build/example/pch/jamroot.jam b/src/boost/tools/build/example/pch/jamroot.jam
new file mode 100644
index 000000000..ad6595567
--- /dev/null
+++ b/src/boost/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.txt or copy at
+# https://www.bfgroup.xyz/b2/LICENSE.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/src/boost/tools/build/example/pch/source/hello_world.cpp b/src/boost/tools/build/example/pch/source/hello_world.cpp
new file mode 100644
index 000000000..db8b91f2d
--- /dev/null
+++ b/src/boost/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.txt or copy at
+ https://www.bfgroup.xyz/b2/LICENSE.txt)
+*/
+
+#include <pch.hpp>
+
+int main()
+{
+ TestClass c(1, 2);
+ return 0;
+}