From fa61b68c56648dc1f8e1142dc6fe36792ec38c1d Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 7 Oct 2006 10:09:07 +0000 Subject: [PATCH] Add PCH example. [SVN r35513] --- v2/example/pch/Jamroot | 29 +++++++++++++++++++++++++++ v2/example/pch/include/pch.hpp | 11 ++++++++++ v2/example/pch/source/hello_world.cpp | 15 ++++++++++++++ v2/example/pch/source/pch.cpp | 8 ++++++++ 4 files changed, 63 insertions(+) create mode 100644 v2/example/pch/Jamroot create mode 100644 v2/example/pch/include/pch.hpp create mode 100644 v2/example/pch/source/hello_world.cpp create mode 100644 v2/example/pch/source/pch.cpp diff --git a/v2/example/pch/Jamroot b/v2/example/pch/Jamroot new file mode 100644 index 000000000..509de203a --- /dev/null +++ b/v2/example/pch/Jamroot @@ -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 + msvc:source/pch.cpp + ; + +# exe ########################################################################## + +exe hello_world + : # sources + pch + source/hello_world.cpp + : # requirements + include + : # default build + : # usage requirements + ; diff --git a/v2/example/pch/include/pch.hpp b/v2/example/pch/include/pch.hpp new file mode 100644 index 000000000..22df8443f --- /dev/null +++ b/v2/example/pch/include/pch.hpp @@ -0,0 +1,11 @@ +/* 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) +*/ + +class TestClass { +public: + TestClass(int, int) {} +}; diff --git a/v2/example/pch/source/hello_world.cpp b/v2/example/pch/source/hello_world.cpp new file mode 100644 index 000000000..f618056a0 --- /dev/null +++ b/v2/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 + +int main() +{ + TestClass c(1, 2); + return 0; +} diff --git a/v2/example/pch/source/pch.cpp b/v2/example/pch/source/pch.cpp new file mode 100644 index 000000000..995e1f803 --- /dev/null +++ b/v2/example/pch/source/pch.cpp @@ -0,0 +1,8 @@ +/* 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) +*/ + +#include