diff --git a/src/tools/stlport.jam b/src/tools/stlport.jam index cceafb64a..bc0f7027f 100644 --- a/src/tools/stlport.jam +++ b/src/tools/stlport.jam @@ -89,20 +89,6 @@ class stlport-target-class : basic-target self.libraries = $(libraries) ; self.version = $(version) ; self.version.5 = [ MATCH "^(5[.][0123456789]+).*" : $(version) ] ; - - local requirements ; - requirements += $(self.version) ; - if $(self.version.5) - { - # For STLport 5.x multi-threading is required. - #~ requirements += multi ; - - #~ Doesn't currently work as the matching fallback takes over - #~ and matches a build without stlport when threading-multi is not - #~ specified. Question stands as to wether single-thread code - #~ can use the multi-thread STLport. - } - self.requirements = [ property-set.create $(requirements) ] ; } rule generate ( property-set ) @@ -246,6 +232,19 @@ class stlport-target-class : basic-target _STLP_NO_OWN_IOSTREAMS=1 _STLP_HAS_NO_NEW_IOSTREAMS=1 ; } + if $(self.version.5) + { + # Version 5.x + if [ $(rproperties).get ] = "single" + { + # Since STLport5 doesn't normally support single-thread + # we force STLport5 into the multi-thread mode. Hence + # getting what other libs provide of single-thread code + # linking against a multi-thread lib. + usage-requirements += + _STLP_THREADS=1 ; + } + } #~ Allow setting up to use STLport by only using the library target #~ /stlport//stlport.