summaryrefslogtreecommitdiff
path: root/boostcpp.jam
diff options
context:
space:
mode:
authorSteven Watanabe <steven@providere-consulting.com>2018-01-31 13:12:22 -0700
committerSteven Watanabe <steven@providere-consulting.com>2018-08-30 13:33:23 -0600
commit06c1e1ee6cde5231eda696b8d7bf957fd1333d93 (patch)
tree96e456743bcb082de7fe490e448374528792583b /boostcpp.jam
parent812a820e234fd3cb1f857d16b6b5c51ed0b1201d (diff)
downloadboost-06c1e1ee6cde5231eda696b8d7bf957fd1333d93.tar.gz
Make tagged layout consistent with versioned layout. Also, enable explicitly using old layouts.
Diffstat (limited to 'boostcpp.jam')
-rw-r--r--boostcpp.jam84
1 files changed, 64 insertions, 20 deletions
diff --git a/boostcpp.jam b/boostcpp.jam
index c5d5f53ee1..cb01893cfc 100644
--- a/boostcpp.jam
+++ b/boostcpp.jam
@@ -25,6 +25,7 @@ import set ;
import targets ;
import feature ;
import property ;
+import version : version-less ;
##############################################################################
#
@@ -59,6 +60,23 @@ if ! ( $(build-type) in complete minimal )
# What kind of layout are we doing?
layout = [ option.get layout : "" ] ;
+
+layout = [ MATCH (versioned|tagged|system)(-(.+))? : $(layout) ] ;
+if $(layout[3])
+{
+ layout-version = $(layout[3]) ;
+ layout = $(layout[1]) ;
+ if [ version-less [ regex.split $(layout-version) "[.]" ] : 1 66 ]
+ {
+ layout-version = 1.40 ;
+ }
+ else if [ version-less [ regex.split $(layout-version) "[.]" ] : 1 67 ]
+ {
+ layout-version = 1.66 ;
+ }
+}
+layout-version ?= 1.67 ;
+
# On Windows, we used versioned layout by default in order to be compatible with
# autolink. On other systems, we use system layout which is what every other
# program uses. Note that the Windows check is static, and will not be affected
@@ -109,6 +127,46 @@ if $(python-id)
}
+if $(layout) = versioned
+{
+ switch $(layout-version)
+ {
+ case 1.40 :
+ .format-name-args =
+ <base> <toolset> <threading> <runtime> ;
+ case 1.66 :
+ .format-name-args =
+ <base> <toolset> <threading> <runtime> <arch-and-model> ;
+ case 1.67 :
+ .format-name-args =
+ <base> <toolset> <threading> <runtime> <arch-and-model> ;
+ }
+}
+else if $(layout) = tagged
+{
+ switch $(layout-version)
+ {
+ case 1.40 :
+ .format-name-args =
+ <base> <threading> <runtime> ;
+ case 1.66 :
+ .format-name-args =
+ <base> <threading> <runtime> ;
+ case 1.67 :
+ .format-name-args =
+ <base> <threading> <runtime> <arch-and-model> ;
+ }
+}
+else if $(layout) = system
+{
+ .format-name-args = <base> ;
+}
+else
+{
+ .format-name-error = true ;
+}
+
+
################################################################################
#
# 1. 'tag' function adding decorations suitable to the properties if versioned
@@ -120,29 +178,15 @@ rule tag ( name : type ? : property-set )
{
if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
{
- local result ;
+ local args = $(.format-name-args) ;
if $(layout) = versioned
{
- result = [ common.format-name
- <base> <toolset> <threading> <runtime> <arch-and-model> -$(BOOST_VERSION_TAG)
- -$(BUILD_ID)
- : $(name) : $(type) : $(property-set) ] ;
- }
- else if $(layout) = tagged
- {
- result = [ common.format-name
- <base> <threading> <runtime>
- -$(BUILD_ID)
- : $(name) : $(type) : $(property-set) ] ;
+ args += -$(BOOST_VERSION_TAG) ;
}
- else if $(layout) = system
- {
- result = [ common.format-name
- <base>
- -$(BUILD_ID)
- : $(name) : $(type) : $(property-set) ] ;
- }
- else
+ local result = [ common.format-name
+ $(args) -$(BUILD_ID)
+ : $(name) : $(type) : $(property-set) ] ;
+ if $(.format-name-error)
{
EXIT error\: invalid layout '$(layout:E=)' ;
}