Boost logo

Boost-Commit :

From: grafikrobot_at_[hidden]
Date: 2007-11-25 15:10:11


Author: grafik
Date: 2007-11-25 15:10:10 EST (Sun, 25 Nov 2007)
New Revision: 41380
URL: http://svn.boost.org/trac/boost/changeset/41380

Log:
Add --build-type option to root build. Two choices possible at the moment "minimal" and "complete". With minimal as the default we only build the common release variant. The old behavior of building many variants is available with "complete".
Text files modified:
   trunk/Jamroot | 63 ++++++++++++++++++++++++++++-----------
   1 files changed, 45 insertions(+), 18 deletions(-)

Modified: trunk/Jamroot
==============================================================================
--- trunk/Jamroot (original)
+++ trunk/Jamroot 2007-11-25 15:10:10 EST (Sun, 25 Nov 2007)
@@ -1,6 +1,6 @@
 # Copyright Vladimir Prus 2002-2006.
 # Copyright Dave Abrahams 2005-2006.
-# Copyright Rene Rivera 2005-2006.
+# Copyright Rene Rivera 2005-2007.
 # Copyright Douglas Gregor 2005.
 #
 # Distributed under the Boost Software License, Version 1.0.
@@ -39,6 +39,20 @@
 #
 # Other Options:
 #
+# --build-type=<type> Build the specified pre-defined set of variations
+# of the libraries. Note, that which variants get
+# built depends on what each library supports.
+#
+# minimal (default) - Builds the single
+# "release" version of the libraries. This
+# release corresponds to specifying:
+# "release <threading>multi <link>shared
+# <runtime-link>shared" as the Boost.Build
+# variant to build.
+#
+# complete - Attempts to build all possible
+# variations.
+#
 # --builddir=DIR Build in this location instead of building
 # within the distribution tree. Recommended!
 #
@@ -109,25 +123,38 @@
 
 constant BOOST_VERSION_TAG : $(version-tag:J="_") ;
 
-local default-build ;
-if $(__file__:D) = ""
-{
- default-build =
- debug release
- <threading>single <threading>multi
- <link>shared <link>static
- ;
-
- if [ os.name ] = NT
- {
- default-build += <runtime-link>shared <runtime-link>static ;
- }
+# Option to choose how many variants to build. The default is "minimal",
+# which builds only the "release <threading>multi <link>shared" variant.
+local build-type = [ MATCH "^--build-type=(.*)" : [ modules.peek : ARGV ] ] ;
+build-type ?= minimal ;
+if ! ( $(build-type) in minimal complete )
+{
+ build-type = minimal ;
 }
-else
+
+# Specify the build variants keyed on the build-type.
+local default-build,minimal =
+ release
+ <threading>multi
+ <link>shared
+ <runtime-link>shared
+ ;
+local default-build,complete =
+ debug release
+ <threading>single <threading>multi
+ <link>shared <link>static
+ <runtime-link>shared <runtime-link>static
+ ;
+
+# Set the default build.
+local default-build = $(default-build,$(build-type)) ;
+
+# We only use the default build when building at the root to
+# avoid having it impact the default regression testing of "debug".
+# TODO: Consider having a "testing" build type instead of this check.
+if $(__file__:D) != ""
 {
- default-build =
- debug
- ;
+ default-build = debug ;
 }
 
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk