2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 01:12:13 +00:00

Add PCH example.

[SVN r35513]
This commit is contained in:
Vladimir Prus
2006-10-07 10:09:07 +00:00
parent 1d1ab035c1
commit fa61b68c56
4 changed files with 63 additions and 0 deletions

29
v2/example/pch/Jamroot Normal file
View File

@@ -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
<toolset>msvc:<source>source/pch.cpp
;
# exe ##########################################################################
exe hello_world
: # sources
pch
source/hello_world.cpp
: # requirements
<include>include
: # default build
: # usage requirements
;

View File

@@ -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) {}
};

View File

@@ -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;
}

View File

@@ -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 <pch.hpp>