diff options
Diffstat (limited to 'src/boost/tools/build/example/pch-multi')
5 files changed, 99 insertions, 0 deletions
diff --git a/src/boost/tools/build/example/pch-multi/include/extra/meta.hpp b/src/boost/tools/build/example/pch-multi/include/extra/meta.hpp new file mode 100644 index 000000000..6a85b0886 --- /dev/null +++ b/src/boost/tools/build/example/pch-multi/include/extra/meta.hpp @@ -0,0 +1,17 @@ +/* + Copyright Rene Rivera 2019 + + 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) +*/ + +#ifndef B2_EXAMPLE_PCH_MULTI_EXTRA_META_HPP +#define B2_EXAMPLE_PCH_MULTI_EXTRA_META_HPP + +#include <type_traits> +#include <functional> +#include <typeindex> +#include <tuple> + +#endif diff --git a/src/boost/tools/build/example/pch-multi/include/pch.hpp b/src/boost/tools/build/example/pch-multi/include/pch.hpp new file mode 100644 index 000000000..8f05cc43d --- /dev/null +++ b/src/boost/tools/build/example/pch-multi/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-multi/include/std.hpp b/src/boost/tools/build/example/pch-multi/include/std.hpp new file mode 100644 index 000000000..89e76bf6a --- /dev/null +++ b/src/boost/tools/build/example/pch-multi/include/std.hpp @@ -0,0 +1,16 @@ +/* + Copyright Rene Rivera 2019 + + 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) +*/ + +#ifndef B2_EXAMPLE_PCH_MULTI_STD_HPP +#define B2_EXAMPLE_PCH_MULTI_STD_HPP + +#include <iostream> +#include <vector> +#include <algorithm> + +#endif diff --git a/src/boost/tools/build/example/pch-multi/jamroot.jam b/src/boost/tools/build/example/pch-multi/jamroot.jam new file mode 100644 index 000000000..fd1528510 --- /dev/null +++ b/src/boost/tools/build/example/pch-multi/jamroot.jam @@ -0,0 +1,30 @@ +# 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 ; + +local pchs ; +for local hpp in [ glob-tree *.hpp ] +{ + cpp-pch $(hpp:B) : $(hpp) : <include>include ; + explicit $(hpp:B) ; + pchs += $(hpp:B) ; +} +alias headers : $(pchs) ; + +# exe ########################################################################## + +exe hello_world + : # sources + headers + source/hello_world.cpp + : # requirements + <include>include + : # default build + : # usage requirements + ; diff --git a/src/boost/tools/build/example/pch-multi/source/hello_world.cpp b/src/boost/tools/build/example/pch-multi/source/hello_world.cpp new file mode 100644 index 000000000..741bf7025 --- /dev/null +++ b/src/boost/tools/build/example/pch-multi/source/hello_world.cpp @@ -0,0 +1,17 @@ +/* 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> +#include <std.hpp> +#include <extra/meta.hpp> + +int main() +{ + TestClass c(1, 2); + return 0; +} |