From 8335fb2851abf8b99a63b127ea2ba66046b7d1a4 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 21 Sep 2005 14:43:44 +0000 Subject: [PATCH] Edits in "Conditions and alternatives" section. [SVN r31071] --- v2/doc/src/tutorial.xml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/v2/doc/src/tutorial.xml b/v2/doc/src/tutorial.xml index aa2d91813..41b4c988e 100644 --- a/v2/doc/src/tutorial.xml +++ b/v2/doc/src/tutorial.xml @@ -572,12 +572,11 @@ exe app : app.cpp core ; Conditions and alternatives Sometimes, particular relationships need to be maintained - among a target's build properties. This can be achieved with - conditional - requirement. For example, you might want to set - specific #defines when a library is built as shared, - or when a target's release variant is built in - release mode. + among a target's build properties. For example, you might want to set + specific #define when a library is built as shared, + or when a target's release variant is built. + This can be achieved with conditional requirements. + lib network : network.cpp : <link>shared:<define>NEWORK_LIB_SHARED @@ -588,7 +587,8 @@ lib network : network.cpp In the example above, whenever network is built with <link>shared, <define>NEWORK_LIB_SHARED will be in its - properties, too. + properties, too. Also, whenever its release variant is built, + <define>EXTRA_FAST will appear in its properties. @@ -603,11 +603,12 @@ lib demangler : dummy_demangler.cpp ; # alternative 1 lib demangler : demangler_gcc.cpp : <toolset>gcc ; # alternative 2 lib demangler : demangler_msvc.cpp : <toolset>msvc ; # alternative 3 - In the example above, when built with gcc - or msvc, demangler - will use a source file specific to the toolset. Otherwise, it - will use a generic source file, - dummy_demangler.cpp. + When building demangler, Boost.Build will compare + requirements for each alternative with build properties to find the best match. + For example, when building with with <toolset>gcc + alternative 2, will be selected, and when building with + <toolset>msvc alternative 3 will be selected. In all other + cases, the most generic alternative 1 will be built.