mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 01:12:13 +00:00
add <define> example
[SVN r16870]
This commit is contained in:
101
build_system.htm
101
build_system.htm
@@ -197,8 +197,7 @@
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
bjam -sTOOLS=gcc my_target
|
||||
<pre>bjam -sTOOLS=gcc my_target
|
||||
</pre>
|
||||
</td>
|
||||
|
||||
@@ -208,8 +207,7 @@ bjam -sTOOLS=gcc my_target
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
bjam -sTOOLS="msvc gcc"
|
||||
<pre>bjam -sTOOLS="msvc gcc"
|
||||
</pre>
|
||||
</td>
|
||||
|
||||
@@ -218,8 +216,7 @@ bjam -sTOOLS="msvc gcc"
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
set TOOLS=msvc
|
||||
<pre>set TOOLS=msvc
|
||||
bjam
|
||||
</pre>
|
||||
</td>
|
||||
@@ -230,8 +227,7 @@ bjam
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
bjam "-sBUILD=release <debug-symbols>on"
|
||||
<pre>bjam "-sBUILD=release <debug-symbols>on"
|
||||
</pre>
|
||||
</td>
|
||||
|
||||
@@ -241,8 +237,7 @@ bjam "-sBUILD=release <debug-symbols>on"
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
bjam -sBUILD="debug release"
|
||||
<pre>bjam -sBUILD="debug release"
|
||||
</pre>
|
||||
</td>
|
||||
|
||||
@@ -267,7 +262,13 @@ bjam -sBUILD="debug release"
|
||||
<td>Set an NT environment variable to always build with MSVC and
|
||||
GCC<br>
|
||||
default-build <tt>all</tt>, adding a MSVC-specific compiler command
|
||||
line switch</td>
|
||||
line switch.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>bjam "-sBUILD=<define>BOOST_POSIX"</code></td>
|
||||
|
||||
<td>build all, with the macro BOOST_POSIX defined for all compilers.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -283,8 +284,7 @@ bjam -sBUILD="debug release"
|
||||
you can set them there:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
> <a href="#build">BUILD</a>="debug release" <i># assuming Unix</i>
|
||||
<pre>> <a href="#build">BUILD</a>="debug release" <i># assuming Unix</i>
|
||||
> export <a href="#build">BUILD</a>
|
||||
> bjam ...
|
||||
</pre>
|
||||
@@ -307,8 +307,7 @@ bjam -sBUILD="debug release"
|
||||
href="#jamrules">Jamrules</a></tt> file:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
subproject foo/bar/baz ; # path to here from project root
|
||||
<pre>subproject foo/bar/baz ; # path to here from project root
|
||||
|
||||
# A static library called 'baz'
|
||||
lib baz : baz1.cpp baz2.cpp # C++ sources
|
||||
@@ -330,8 +329,7 @@ exe test : <lib>baz # use the 'baz' library
|
||||
add a Jamfile at the root:</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
project-root ; # declare this to be the project root directory
|
||||
<pre>project-root ; # declare this to be the project root directory
|
||||
# Read subproject Jamfiles
|
||||
subinclude foo/bar/baz <font color="#7F7F7F">foo/bar/...</font> ;
|
||||
<font color="#7F7F7F">subinclude a/b/c ...</font> ; # more subincludes
|
||||
@@ -495,8 +493,7 @@ subinclude foo/bar/baz <font color="#7F7F7F">foo/bar/...</font> ;
|
||||
structure (target directories in <b>bold</b>).</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
bin
|
||||
<pre> bin
|
||||
+-foo <font color="#7F7F7F"><--- foo's build root</font>
|
||||
| +-gcc
|
||||
| | +-<b>debug</b>
|
||||
@@ -537,8 +534,7 @@ subinclude foo/bar/baz <font color="#7F7F7F">foo/bar/...</font> ;
|
||||
fragment of the target tree might look like:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
bin
|
||||
<pre> bin
|
||||
+-foo <font color="#7F7F7F"><--- foo's build root</font>
|
||||
| +-msvc
|
||||
| | +-debug
|
||||
@@ -560,8 +556,7 @@ subinclude foo/bar/baz <font color="#7F7F7F">foo/bar/...</font> ;
|
||||
subvariant directories in the example above would be generated:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
bin
|
||||
<pre> bin
|
||||
+-foo <font color="#7F7F7F"><--- foo's build root</font>
|
||||
| +-msvc
|
||||
| | +-debug
|
||||
@@ -584,8 +579,7 @@ subinclude foo/bar/baz <font color="#7F7F7F">foo/bar/...</font> ;
|
||||
following structure for a DLL:</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
bin
|
||||
<pre> bin
|
||||
+-foo <font color="#7F7F7F"><--- foo's build root</font>
|
||||
| +-msvc
|
||||
| | +-debug
|
||||
@@ -642,8 +636,7 @@ subinclude foo/bar/baz <font color="#7F7F7F">foo/bar/...</font> ;
|
||||
declares:</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
exe my_target : my_source1.cpp my_source2.c ;
|
||||
<pre>exe my_target : my_source1.cpp my_source2.c ;
|
||||
</pre>
|
||||
</blockquote>
|
||||
and you invoke Jam with <tt>-sBUILD="debug release" my_target</tt>,
|
||||
@@ -756,8 +749,7 @@ exe my_target : my_source1.cpp my_source2.c ;
|
||||
relative to the top of the project tree:</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
subproject <i>path-from-top</i> ;
|
||||
<pre>subproject <i>path-from-top</i> ;
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
@@ -768,8 +760,7 @@ subproject <i>path-from-top</i> ;
|
||||
instead:</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
project-root ;
|
||||
<pre>project-root ;
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
@@ -778,8 +769,7 @@ project-root ;
|
||||
<p>A main target is described using the following syntax:</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
<i>target-type</i> <i>name</i> : <i>sources</i>
|
||||
<pre><i>target-type</i> <i>name</i> : <i>sources</i>
|
||||
[ : <i>requirements</i> [ : <i><a href=
|
||||
"#default_build">default-BUILD</a></i> ] ] ;
|
||||
</pre>
|
||||
@@ -836,8 +826,7 @@ project-root ;
|
||||
sets of optionally-<b>qualified build properties</b>:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
[[<<i>compiler</i>>]<<i>variant</i>>]<<i>feature</i>><i>value</i>
|
||||
<pre>[[<<i>compiler</i>>]<<i>variant</i>>]<<i>feature</i>><i>value</i>
|
||||
</pre>
|
||||
</blockquote>
|
||||
<tt><<i>compiler</i>></tt> and <tt><<i>variant</i>></tt>,
|
||||
@@ -865,8 +854,7 @@ project-root ;
|
||||
properties</b>:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
[[<<i>compiler</i>>]<<i>variant</i>>]<<i>feature</i>><i>value1</i>[/<i>value2</i>...]
|
||||
<pre>[[<<i>compiler</i>>]<<i>variant</i>>]<<i>feature</i>><i>value1</i>[/<i>value2</i>...]
|
||||
</pre>
|
||||
</blockquote>
|
||||
When multiple values are specified, it causes <i>all</i> the implied
|
||||
@@ -880,8 +868,7 @@ project-root ;
|
||||
when another target like an exe is built. Such use might look like:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
lib basic : basic.cpp : : <suppress>true ;<br>
|
||||
<pre>lib basic : basic.cpp : : <suppress>true ;<br>
|
||||
<br>
|
||||
exe test : test.cpp <lib>basic ;<br>
|
||||
</pre>
|
||||
@@ -947,8 +934,7 @@ exe test : test.cpp <lib>basic ;<br>
|
||||
your collecting different builds of the same targets. The syntax is:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
<tag><<i>feature|variant</i>><i>value</i>
|
||||
<pre><tag><<i>feature|variant</i>><i>value</i>
|
||||
</pre>
|
||||
</blockquote>
|
||||
<br>
|
||||
@@ -977,8 +963,7 @@ exe test : test.cpp <lib>basic ;<br>
|
||||
in <tt>../bazlib/Jamfile</tt>.</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
template base :
|
||||
<pre>template base :
|
||||
## <a href="#target_requirements">Requirements</a> ##
|
||||
: <include>../bazlib/include
|
||||
<define>BUILDING_FOO=1
|
||||
@@ -1053,8 +1038,7 @@ exe fop : <template>executable fop.cpp ;
|
||||
<p>Variants are described with the following syntax:</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
variant <i>name</i> : [<<i>toolset-name</i>>]<<i>feature</i>>value... ;
|
||||
<pre>variant <i>name</i> : [<<i>toolset-name</i>>]<<i>feature</i>>value... ;
|
||||
</pre>
|
||||
</blockquote>
|
||||
The <tt>variant</tt> rule specifies the list of properties comprising a
|
||||
@@ -1068,8 +1052,7 @@ variant <i>name</i> : [<<i>toolset-name</i>>]<<i>feature</i>>value..
|
||||
targets. For example:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
variant my-globals : <rtti>off ;
|
||||
<pre>variant my-globals : <rtti>off ;
|
||||
|
||||
variant my-debug : my-globals debug ;
|
||||
|
||||
@@ -1108,8 +1091,7 @@ variant my-release : my-globals release ;
|
||||
is uniquely defined for the toolset. For example,
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
rule C++-action
|
||||
<pre>rule C++-action
|
||||
{
|
||||
msvc-C++-action $(<) : $(>) ;
|
||||
}
|
||||
@@ -1143,8 +1125,7 @@ actions msvc-C++-action
|
||||
actions. The <tt>flags</tt> rule is used as follows:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
flags <i>toolset variable condition</i> [: <i>value</i>...]
|
||||
<pre>flags <i>toolset variable condition</i> [: <i>value</i>...]
|
||||
</pre>
|
||||
</blockquote>
|
||||
The parameters are:
|
||||
@@ -1194,8 +1175,7 @@ flags <i>toolset variable condition</i> [: <i>value</i>...]
|
||||
to specify how optimization can be turned off for MSVC:</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
flags msvc CFLAGS <optimization>off : /Od ;
|
||||
<pre>flags msvc CFLAGS <optimization>off : /Od ;
|
||||
</pre>
|
||||
</blockquote>
|
||||
It says that the string <tt>/Od</tt> should be added to the global
|
||||
@@ -1205,8 +1185,7 @@ flags msvc CFLAGS <optimization>off : /Od ;
|
||||
<p>Similarly, in the following example,</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
flags msvc CFLAGS <runtime-build>release/<runtime-link>dynamic : /MD ;
|
||||
<pre>flags msvc CFLAGS <runtime-build>release/<runtime-link>dynamic : /MD ;
|
||||
</pre>
|
||||
</blockquote>
|
||||
we add <tt>/MD</tt> to the CFLAGS variable when both of the specified
|
||||
@@ -1215,8 +1194,7 @@ flags msvc CFLAGS <runtime-build>release/<runtime-link>dynamic : /MD
|
||||
follows:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
flags msvc HDRS <include> ;
|
||||
<pre>flags msvc HDRS <include> ;
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
@@ -1279,8 +1257,7 @@ flags msvc HDRS <include> ;
|
||||
values:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
ECHO $(gFUBAR($(x),$(y))) ;
|
||||
<pre> ECHO $(gFUBAR($(x),$(y))) ;
|
||||
</pre>
|
||||
</blockquote>
|
||||
</li>
|
||||
@@ -1401,10 +1378,8 @@ flags msvc HDRS <include> ;
|
||||
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan
|
||||
-->24 May, 2002
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="13972"
|
||||
-->11 January, 2003<!--webbot bot="Timestamp" endspan i-checksum="38567"
|
||||
-->
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
@@ -197,8 +197,7 @@
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
bjam -sTOOLS=gcc my_target
|
||||
<pre>bjam -sTOOLS=gcc my_target
|
||||
</pre>
|
||||
</td>
|
||||
|
||||
@@ -208,8 +207,7 @@ bjam -sTOOLS=gcc my_target
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
bjam -sTOOLS="msvc gcc"
|
||||
<pre>bjam -sTOOLS="msvc gcc"
|
||||
</pre>
|
||||
</td>
|
||||
|
||||
@@ -218,8 +216,7 @@ bjam -sTOOLS="msvc gcc"
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
set TOOLS=msvc
|
||||
<pre>set TOOLS=msvc
|
||||
bjam
|
||||
</pre>
|
||||
</td>
|
||||
@@ -230,8 +227,7 @@ bjam
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
bjam "-sBUILD=release <debug-symbols>on"
|
||||
<pre>bjam "-sBUILD=release <debug-symbols>on"
|
||||
</pre>
|
||||
</td>
|
||||
|
||||
@@ -241,8 +237,7 @@ bjam "-sBUILD=release <debug-symbols>on"
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
bjam -sBUILD="debug release"
|
||||
<pre>bjam -sBUILD="debug release"
|
||||
</pre>
|
||||
</td>
|
||||
|
||||
@@ -267,7 +262,13 @@ bjam -sBUILD="debug release"
|
||||
<td>Set an NT environment variable to always build with MSVC and
|
||||
GCC<br>
|
||||
default-build <tt>all</tt>, adding a MSVC-specific compiler command
|
||||
line switch</td>
|
||||
line switch.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>bjam "-sBUILD=<define>BOOST_POSIX"</code></td>
|
||||
|
||||
<td>build all, with the macro BOOST_POSIX defined for all compilers.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -283,8 +284,7 @@ bjam -sBUILD="debug release"
|
||||
you can set them there:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
> <a href="#build">BUILD</a>="debug release" <i># assuming Unix</i>
|
||||
<pre>> <a href="#build">BUILD</a>="debug release" <i># assuming Unix</i>
|
||||
> export <a href="#build">BUILD</a>
|
||||
> bjam ...
|
||||
</pre>
|
||||
@@ -307,8 +307,7 @@ bjam -sBUILD="debug release"
|
||||
href="#jamrules">Jamrules</a></tt> file:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
subproject foo/bar/baz ; # path to here from project root
|
||||
<pre>subproject foo/bar/baz ; # path to here from project root
|
||||
|
||||
# A static library called 'baz'
|
||||
lib baz : baz1.cpp baz2.cpp # C++ sources
|
||||
@@ -330,8 +329,7 @@ exe test : <lib>baz # use the 'baz' library
|
||||
add a Jamfile at the root:</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
project-root ; # declare this to be the project root directory
|
||||
<pre>project-root ; # declare this to be the project root directory
|
||||
# Read subproject Jamfiles
|
||||
subinclude foo/bar/baz <font color="#7F7F7F">foo/bar/...</font> ;
|
||||
<font color="#7F7F7F">subinclude a/b/c ...</font> ; # more subincludes
|
||||
@@ -495,8 +493,7 @@ subinclude foo/bar/baz <font color="#7F7F7F">foo/bar/...</font> ;
|
||||
structure (target directories in <b>bold</b>).</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
bin
|
||||
<pre> bin
|
||||
+-foo <font color="#7F7F7F"><--- foo's build root</font>
|
||||
| +-gcc
|
||||
| | +-<b>debug</b>
|
||||
@@ -537,8 +534,7 @@ subinclude foo/bar/baz <font color="#7F7F7F">foo/bar/...</font> ;
|
||||
fragment of the target tree might look like:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
bin
|
||||
<pre> bin
|
||||
+-foo <font color="#7F7F7F"><--- foo's build root</font>
|
||||
| +-msvc
|
||||
| | +-debug
|
||||
@@ -560,8 +556,7 @@ subinclude foo/bar/baz <font color="#7F7F7F">foo/bar/...</font> ;
|
||||
subvariant directories in the example above would be generated:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
bin
|
||||
<pre> bin
|
||||
+-foo <font color="#7F7F7F"><--- foo's build root</font>
|
||||
| +-msvc
|
||||
| | +-debug
|
||||
@@ -584,8 +579,7 @@ subinclude foo/bar/baz <font color="#7F7F7F">foo/bar/...</font> ;
|
||||
following structure for a DLL:</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
bin
|
||||
<pre> bin
|
||||
+-foo <font color="#7F7F7F"><--- foo's build root</font>
|
||||
| +-msvc
|
||||
| | +-debug
|
||||
@@ -642,8 +636,7 @@ subinclude foo/bar/baz <font color="#7F7F7F">foo/bar/...</font> ;
|
||||
declares:</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
exe my_target : my_source1.cpp my_source2.c ;
|
||||
<pre>exe my_target : my_source1.cpp my_source2.c ;
|
||||
</pre>
|
||||
</blockquote>
|
||||
and you invoke Jam with <tt>-sBUILD="debug release" my_target</tt>,
|
||||
@@ -756,8 +749,7 @@ exe my_target : my_source1.cpp my_source2.c ;
|
||||
relative to the top of the project tree:</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
subproject <i>path-from-top</i> ;
|
||||
<pre>subproject <i>path-from-top</i> ;
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
@@ -768,8 +760,7 @@ subproject <i>path-from-top</i> ;
|
||||
instead:</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
project-root ;
|
||||
<pre>project-root ;
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
@@ -778,8 +769,7 @@ project-root ;
|
||||
<p>A main target is described using the following syntax:</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
<i>target-type</i> <i>name</i> : <i>sources</i>
|
||||
<pre><i>target-type</i> <i>name</i> : <i>sources</i>
|
||||
[ : <i>requirements</i> [ : <i><a href=
|
||||
"#default_build">default-BUILD</a></i> ] ] ;
|
||||
</pre>
|
||||
@@ -836,8 +826,7 @@ project-root ;
|
||||
sets of optionally-<b>qualified build properties</b>:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
[[<<i>compiler</i>>]<<i>variant</i>>]<<i>feature</i>><i>value</i>
|
||||
<pre>[[<<i>compiler</i>>]<<i>variant</i>>]<<i>feature</i>><i>value</i>
|
||||
</pre>
|
||||
</blockquote>
|
||||
<tt><<i>compiler</i>></tt> and <tt><<i>variant</i>></tt>,
|
||||
@@ -865,8 +854,7 @@ project-root ;
|
||||
properties</b>:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
[[<<i>compiler</i>>]<<i>variant</i>>]<<i>feature</i>><i>value1</i>[/<i>value2</i>...]
|
||||
<pre>[[<<i>compiler</i>>]<<i>variant</i>>]<<i>feature</i>><i>value1</i>[/<i>value2</i>...]
|
||||
</pre>
|
||||
</blockquote>
|
||||
When multiple values are specified, it causes <i>all</i> the implied
|
||||
@@ -880,8 +868,7 @@ project-root ;
|
||||
when another target like an exe is built. Such use might look like:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
lib basic : basic.cpp : : <suppress>true ;<br>
|
||||
<pre>lib basic : basic.cpp : : <suppress>true ;<br>
|
||||
<br>
|
||||
exe test : test.cpp <lib>basic ;<br>
|
||||
</pre>
|
||||
@@ -947,8 +934,7 @@ exe test : test.cpp <lib>basic ;<br>
|
||||
your collecting different builds of the same targets. The syntax is:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
<tag><<i>feature|variant</i>><i>value</i>
|
||||
<pre><tag><<i>feature|variant</i>><i>value</i>
|
||||
</pre>
|
||||
</blockquote>
|
||||
<br>
|
||||
@@ -977,8 +963,7 @@ exe test : test.cpp <lib>basic ;<br>
|
||||
in <tt>../bazlib/Jamfile</tt>.</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
template base :
|
||||
<pre>template base :
|
||||
## <a href="#target_requirements">Requirements</a> ##
|
||||
: <include>../bazlib/include
|
||||
<define>BUILDING_FOO=1
|
||||
@@ -1053,8 +1038,7 @@ exe fop : <template>executable fop.cpp ;
|
||||
<p>Variants are described with the following syntax:</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
variant <i>name</i> : [<<i>toolset-name</i>>]<<i>feature</i>>value... ;
|
||||
<pre>variant <i>name</i> : [<<i>toolset-name</i>>]<<i>feature</i>>value... ;
|
||||
</pre>
|
||||
</blockquote>
|
||||
The <tt>variant</tt> rule specifies the list of properties comprising a
|
||||
@@ -1068,8 +1052,7 @@ variant <i>name</i> : [<<i>toolset-name</i>>]<<i>feature</i>>value..
|
||||
targets. For example:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
variant my-globals : <rtti>off ;
|
||||
<pre>variant my-globals : <rtti>off ;
|
||||
|
||||
variant my-debug : my-globals debug ;
|
||||
|
||||
@@ -1108,8 +1091,7 @@ variant my-release : my-globals release ;
|
||||
is uniquely defined for the toolset. For example,
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
rule C++-action
|
||||
<pre>rule C++-action
|
||||
{
|
||||
msvc-C++-action $(<) : $(>) ;
|
||||
}
|
||||
@@ -1143,8 +1125,7 @@ actions msvc-C++-action
|
||||
actions. The <tt>flags</tt> rule is used as follows:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
flags <i>toolset variable condition</i> [: <i>value</i>...]
|
||||
<pre>flags <i>toolset variable condition</i> [: <i>value</i>...]
|
||||
</pre>
|
||||
</blockquote>
|
||||
The parameters are:
|
||||
@@ -1194,8 +1175,7 @@ flags <i>toolset variable condition</i> [: <i>value</i>...]
|
||||
to specify how optimization can be turned off for MSVC:</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
flags msvc CFLAGS <optimization>off : /Od ;
|
||||
<pre>flags msvc CFLAGS <optimization>off : /Od ;
|
||||
</pre>
|
||||
</blockquote>
|
||||
It says that the string <tt>/Od</tt> should be added to the global
|
||||
@@ -1205,8 +1185,7 @@ flags msvc CFLAGS <optimization>off : /Od ;
|
||||
<p>Similarly, in the following example,</p>
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
flags msvc CFLAGS <runtime-build>release/<runtime-link>dynamic : /MD ;
|
||||
<pre>flags msvc CFLAGS <runtime-build>release/<runtime-link>dynamic : /MD ;
|
||||
</pre>
|
||||
</blockquote>
|
||||
we add <tt>/MD</tt> to the CFLAGS variable when both of the specified
|
||||
@@ -1215,8 +1194,7 @@ flags msvc CFLAGS <runtime-build>release/<runtime-link>dynamic : /MD
|
||||
follows:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
flags msvc HDRS <include> ;
|
||||
<pre>flags msvc HDRS <include> ;
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
@@ -1279,8 +1257,7 @@ flags msvc HDRS <include> ;
|
||||
values:
|
||||
|
||||
<blockquote>
|
||||
<pre>
|
||||
ECHO $(gFUBAR($(x),$(y))) ;
|
||||
<pre> ECHO $(gFUBAR($(x),$(y))) ;
|
||||
</pre>
|
||||
</blockquote>
|
||||
</li>
|
||||
@@ -1401,10 +1378,8 @@ flags msvc HDRS <include> ;
|
||||
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan
|
||||
-->24 May, 2002
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="13972"
|
||||
-->11 January, 2003<!--webbot bot="Timestamp" endspan i-checksum="38567"
|
||||
-->
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user