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:
29
v2/example/pch/Jamroot
Normal file
29
v2/example/pch/Jamroot
Normal 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
|
||||
;
|
||||
11
v2/example/pch/include/pch.hpp
Normal file
11
v2/example/pch/include/pch.hpp
Normal 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) {}
|
||||
};
|
||||
15
v2/example/pch/source/hello_world.cpp
Normal file
15
v2/example/pch/source/hello_world.cpp
Normal 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;
|
||||
}
|
||||
8
v2/example/pch/source/pch.cpp
Normal file
8
v2/example/pch/source/pch.cpp
Normal 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>
|
||||
Reference in New Issue
Block a user