没有合适的资源?快使用搜索试试~ 我知道了~
Boost.Build_v2_User_Manual.pdf
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 3 浏览量
2022-01-02
22:15:15
上传
评论
收藏 220KB PDF 举报
温馨提示
试读
57页
Boost.Build_v2_User_Manual.pdf
资源推荐
资源详情
资源评论
Part I. Boost.Build v2 User Manual
Draft Draft
Table of Contents
How to use this document .............................................................................................................3
Installation .................................................................................................................................4
Tutorial ..................................................................................................................................... 6
Hello, world .......................................................................................................................6
Properties ..........................................................................................................................6
Project Hierarchies ..............................................................................................................8
Dependent Targets ..............................................................................................................9
Static and shared libaries .................................................................................................... 10
Conditions and alternatives ................................................................................................. 11
Prebuilt targets ................................................................................................................. 11
User documentation ................................................................................................................... 13
Configuration ................................................................................................................... 13
Writing Jamfiles ............................................................................................................... 15
The Build Process ............................................................................................................. 19
Builtin target types ............................................................................................................ 20
Builtin features ................................................................................................................. 24
Differences to Boost.Build V1 ............................................................................................. 25
Extender Manual ....................................................................................................................... 27
Introduction ..................................................................................................................... 27
Target types ..................................................................................................................... 28
Tools and generators .......................................................................................................... 29
Features .......................................................................................................................... 32
Main target rules ............................................................................................................... 34
Toolset modules ................................................................................................................ 35
Detailed reference ..................................................................................................................... 37
General information ........................................................................................................... 37
Writing Jamfiles ............................................................................................................... 39
Build process ................................................................................................................... 39
Definitions ....................................................................................................................... 41
Generators ....................................................................................................................... 45
Frequently Asked Questions ........................................................................................................ 47
I'm getting "Duplicate name of actual target" error. What does it mean? ....................................... 47
Accessing environment variables ......................................................................................... 47
How to control properties order? .......................................................................................... 48
How to control the library order on Unix? .............................................................................. 48
Can I get output of external program as a variable in a Jamfile? ................................................. 48
How to get the project-root location? .................................................................................... 49
How to change compilation flags for one file? ........................................................................ 49
Why are the dll-path and hardcode-dll-paths properties useful? ................................. 49
Targets in site-config.jam ................................................................................................... 50
A. Boost.Build v2 architecture ..................................................................................................... 51
Overview ......................................................................................................................... 51
The build layer ................................................................................................................. 51
The tools layer .................................................................................................................. 53
Targets ............................................................................................................................ 53
Draft Draft
2
How to use this document
If you've just found out about Boost.Build V2 and want to know if it will work for you, start with Tutorial. You can
continue with the User documentation. When you're ready to try Boost.Build in practice, go to Installation.
If you are about to use Boost.Build on your project, or already using it and have a problem, look at User documenta-
tion.
If you're trying to build a project which uses Boost.Build, look at Installation and then read about the section called
“Command line”.
If you have questions, please post them to our mailing list, and be sure to indicate in the subject line that you're ask-
ing about Boost.Build V2.
Draft Draft
3
1
Note that packages prepared for Unix/Linux systems usually make their own choices about where to put things and even which parts of Boost to
include. When we say “released source distribution” we mean a distribution of Boost as released on its SourceForge project page.
2
The Boost.Build subset of boost is also distributed separately, for those who are only interested in getting a build tool. The top-level directory of
a Boost.Build distribution contains all the subdirectories of the tools/build/v2 subdirectory from a full Boost distribution, so it is itself a
valid Boost.Build root directory. It also contains the tools/build/jam_src subdirectory of a full Boost distribution, so you can rebuild
Boost.Jam from source.
Installation
This section describes how to install Boost.Build from a released Boost source distribution or CVS image.
1
All
paths are given relative to the Boost.Build v2 root directory, which is located in the tools/build/v2 subdirect-
ory of a full Boost distribution.
2
1. Boost.Build uses Boost.Jam, an extension of the Perforce Jam portable make replacement. The recommended
way to get Boost.Jam is to download a prebuilt executable from SourceForge. If a prebuilt executable is not
provided for your platform or you are using Boost's sources in an unreleased state, it may be necessary to build
bjam from sources included in the Boost source tree.
2. To install Boost.Jam, copy the executable, called bjam or bjam.exe to a location accessible in your PATH. Go
to the Boost.Build root directory and run bjam --version. You should see:
Boost.Build V2 (Milestone N)
Boost.Jam xx.xx.xx
where N is the version of Boost.Build you're using.
3. Configure Boost.Build to recognize the build resources (such as compilers and libraries) you have installed on
your system. Open the user-config.jam file in the Boost.Build root directory and follow the instructions
there to describe your toolsets and libraries, and, if necessary, where they are located.
4. You should now be able to go to the example/hello/ directory and run bjam there. A simple application
will be built. You can also play with other projects in the example/ directory.
If you are using Boost's CVS state, be sure to rebuild bjam even if you have a previous version. The CVS version of
Boost.Build requires the CVS version of Boost.Jam.
When bjam is invoked, it always needs to be able to find the Boost.Build root directory, where the interpreted
source code of Boost.Build is located. There are two ways to tell bjam about the root directory:
• Set the environment variable BOOST_BUILD_PATH to the absolute path of the Boost.Build root directory.
• At the root directory of your project or in any of its parent directories, create a file called boost-build.jam,
with a single line:
boost-build /path/to/boost.build ;
Draft Draft
4
N.B. When bjam is invoked from anywhere in the Boost directory tree other than the Boost.Build root and its sub-
directories, Boost.Build v1 is used by default. To override the default and use Boost.Build v2, you have to add the -
-v2 command line option to all bjam invocations.
Draft Installation Draft
5
剩余56页未读,继续阅读
资源评论
mYlEaVeiSmVp
- 粉丝: 1921
- 资源: 19万+
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功