Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55699 - in branches/release/libs/regex: . build
From: ghost_at_[hidden]
Date: 2009-08-21 12:55:51


Author: vladimir_prus
Date: 2009-08-21 12:55:51 EDT (Fri, 21 Aug 2009)
New Revision: 55699
URL: http://svn.boost.org/trac/boost/changeset/55699

Log:
Merge: Force shared runtime if using ICU.
Properties modified:
   branches/release/libs/regex/ (props changed)
Text files modified:
   branches/release/libs/regex/build/Jamfile.v2 | 30 ++++++++++++++++++++++++++++++
   1 files changed, 30 insertions(+), 0 deletions(-)

Modified: branches/release/libs/regex/build/Jamfile.v2
==============================================================================
--- branches/release/libs/regex/build/Jamfile.v2 (original)
+++ branches/release/libs/regex/build/Jamfile.v2 2009-08-21 12:55:51 EDT (Fri, 21 Aug 2009)
@@ -221,17 +221,20 @@
       {
          lib icucore : : <name>$(gICU_CORE_LIB) $(ICU_SEARCH_OPTS) <link>shared ;
          ICU_EXTRA_SOURCE = icucore ;
+ explicit icucore ;
       }
       if $(gICU_IN_LIB)
       {
          lib icuin : : <name>$(gICU_IN_LIB) $(ICU_SEARCH_OPTS) <link>shared ;
          ICU_EXTRA_SOURCE += icuin ;
+ explicit icuin ;
       }
 #Added by Tommy Nordgren libicudata must be linked against on Mac OS X
       if $(gICU_DATA_LIB)
       {
          lib icudata : : <name>$(gICU_DATA_LIB) $(ICU_SEARCH_OPTS) <link>shared ;
          ICU_EXTRA_SOURCE += icudata ;
+ explicit icudata ;
       }
 #End of addition by Tommy Nordgren
    }
@@ -267,9 +270,36 @@
              <toolset>gcc-mingw:<link>static
              <toolset>gcc-cygwin:<link>static
              $(BOOST_REGEX_ICU_OPTS)
+ <conditional>@force-shared-linking
     ;
 
+shared-linking-warning-emitted = ;
+
+# The ICU is shipped as shared libraries with dynamic runtime.
+# If Boost.Regex is built against static runtime, the combination
+# will not work. The below rule forces shared runtime, and
+# prints an explanation.
+rule force-shared-linking ( properties * )
+{
+ if $(gHAS_ICU)
+ {
+ if <runtime-link>static in $(properties)
+ {
+ if ! $(shared-linking-warning-emitted)
+ {
+ shared-linking-warning-emitted = 1 ;
+ ECHO "warning: forcing runtime-link=shared for Boost.Regex" ;
+ ECHO "warning: this is required when using the ICU library" ;
+ }
+ }
+ return <runtime-link>shared ;
+ }
+}
+
+
+
 alias icu_options : $(ICU_EXTRA_SOURCE) : : : $(BOOST_REGEX_ICU_OPTS) ;
+explicit icu_options ;
 
 boost-install boost_regex ;
 


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