| 1 | # Boost serialization Library Build Jamfile |
|---|
| 2 | # (C) Copyright Robert Ramey 2002-2004. |
|---|
| 3 | # Use, modification, and distribution are subject to the |
|---|
| 4 | # Boost Software License, Version 1.0. (See accompanying file |
|---|
| 5 | # LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
|---|
| 6 | # |
|---|
| 7 | # See http://www.boost.org/libs/serialization for the library home page. |
|---|
| 8 | |
|---|
| 9 | # building this library needs a working version of spirit |
|---|
| 10 | rule toolset::require-boost-spirit-support ( toolset variant : subvariant-path properties * ) |
|---|
| 11 | { |
|---|
| 12 | local requires-spirit = false ; |
|---|
| 13 | switch $(toolset) { |
|---|
| 14 | case "borland*" : |
|---|
| 15 | requires-spirit = true ; |
|---|
| 16 | case "msvc*" : |
|---|
| 17 | requires-spirit = true ; |
|---|
| 18 | case "iw*" : |
|---|
| 19 | requires-spirit = true ; |
|---|
| 20 | case "vc-6*" : |
|---|
| 21 | requires-spirit = true ; |
|---|
| 22 | case "vc7*" : |
|---|
| 23 | requires-spirit = true ; |
|---|
| 24 | case "vc-7_0*" : |
|---|
| 25 | requires-spirit = true ; |
|---|
| 26 | case "gcc-2*" : |
|---|
| 27 | requires-spirit = true ; |
|---|
| 28 | } |
|---|
| 29 | if $(requires-spirit) = true { |
|---|
| 30 | if $(SPIRIT_ROOT) # && ( exist $(SPIRIT_ROOT) ) |
|---|
| 31 | { |
|---|
| 32 | properties += <include>$(SPIRIT_ROOT) ; |
|---|
| 33 | } |
|---|
| 34 | else { |
|---|
| 35 | echo **** spirit 1.6x required to build library with this compiler **** ; |
|---|
| 36 | properties = [ impose-requirements $(properties) : <build>no ] ; |
|---|
| 37 | } |
|---|
| 38 | } |
|---|
| 39 | return $(subvariant-path) $(properties) ; |
|---|
| 40 | } |
|---|
| 41 | |
|---|
| 42 | # certain tool sets are known apriori not to support wide char i/o |
|---|
| 43 | rule toolset::require-wide-char-io-support ( toolset variant : subvariant-path properties * ) |
|---|
| 44 | { |
|---|
| 45 | switch $(toolset) { |
|---|
| 46 | case "*cygwin" : |
|---|
| 47 | echo **** wide char i/o not supported by cygwin gcc library **** ; |
|---|
| 48 | properties = [ impose-requirements $(properties) : <build>no ] ; |
|---|
| 49 | |
|---|
| 50 | case "como*" : |
|---|
| 51 | echo **** wide char i/o not supported by libcomo standard library **** ; |
|---|
| 52 | properties = [ impose-requirements $(properties) : <build>no ] ; |
|---|
| 53 | case "mingw*" : |
|---|
| 54 | if ! [ MATCH "^([5][.][0])$" : [ get-values <stlport-version> : $(properties) ] ] |
|---|
| 55 | { |
|---|
| 56 | echo **** wide char i/o not supported by the mingw standard library **** ; |
|---|
| 57 | properties = [ impose-requirements $(properties) : <build>no ] ; |
|---|
| 58 | } |
|---|
| 59 | } |
|---|
| 60 | return $(subvariant-path) $(properties) ; |
|---|
| 61 | } |
|---|
| 62 | |
|---|
| 63 | # certain tool sets are known apriori not to support creation of DLLS |
|---|
| 64 | rule toolset::require-shared-libraries-support ( toolset variant : subvariant-path properties * ) |
|---|
| 65 | { |
|---|
| 66 | switch $(toolset) { |
|---|
| 67 | case "como*" : |
|---|
| 68 | echo **** DLLs cannot be built with this compiler **** ; |
|---|
| 69 | properties = [ impose-requirements $(properties) : <build>no ] ; |
|---|
| 70 | case "msvc-stlport*" : |
|---|
| 71 | echo **** DLLs cannot be built with this compiler and stlport 4.x **** ; |
|---|
| 72 | properties = [ impose-requirements $(properties) : <build>no ] ; |
|---|
| 73 | case "vc-6_5-stlport*" : |
|---|
| 74 | echo **** DLLs cannot be built with this compiler and stlport 4.x **** ; |
|---|
| 75 | properties = [ impose-requirements $(properties) : <build>no ] ; |
|---|
| 76 | case "cw*" : |
|---|
| 77 | local runtime-link = [ get-values <runtime-link> : $(properties) ] ; |
|---|
| 78 | if static in $(runtime-link) { |
|---|
| 79 | echo **** locale support only exists with static runtime linking **** ; |
|---|
| 80 | echo **** DLLS cannot be built with static runtime linking **** ; |
|---|
| 81 | properties = [ impose-requirements $(properties) : <build>no ] ; |
|---|
| 82 | } |
|---|
| 83 | } |
|---|
| 84 | return $(subvariant-path) $(properties) ; |
|---|
| 85 | } |
|---|
| 86 | |
|---|
| 87 | # certain tool sets display warnings which are not applicable to the serialization library |
|---|
| 88 | rule toolset::suppress-warnings ( toolset variant : subvariant-path properties * ) |
|---|
| 89 | { |
|---|
| 90 | switch $(toolset) { |
|---|
| 91 | case "vc-8*" : |
|---|
| 92 | properties = [ impose-requirements $(properties) : <cxxflags>"-wd4996" ] ; |
|---|
| 93 | case "*cygwin*" : |
|---|
| 94 | properties = [ impose-requirements $(properties) : <cxxflags>"-Wno-non-virtual-dtor -Wno-ctor-dtor-privacy" ] ; |
|---|
| 95 | case "gcc*" : |
|---|
| 96 | properties = [ impose-requirements $(properties) : <cxxflags>"-Wno-non-virtual-dtor -Wno-ctor-dtor-privacy" ] ; |
|---|
| 97 | case "mingw*" : |
|---|
| 98 | properties = [ impose-requirements $(properties) : <cxxflags>"-Wno-non-virtual-dtor -Wno-ctor-dtor-privacy" ] ; |
|---|
| 99 | case "borland*" : |
|---|
| 100 | properties = [ impose-requirements $(properties) : <cxxflags>"-w-8080 -w-8071 -w-8057 -w-8062 -w-8008 -w-0018 -w-8066" ] ; |
|---|
| 101 | } |
|---|
| 102 | return $(subvariant-path) $(properties) ; |
|---|
| 103 | } |
|---|
| 104 | |
|---|
| 105 | # set optimization switches for certain toolsets. We do it here rather than in the |
|---|
| 106 | # Jamfile requirements because here we can use a regex for the compiler name. |
|---|
| 107 | rule toolset::optimizations ( toolset variant : subvariant-path properties * ) |
|---|
| 108 | { |
|---|
| 109 | switch $(toolset) { |
|---|
| 110 | case "vc*" : |
|---|
| 111 | properties = [ impose-requirements $(properties) : <cxxflags>"-Gy" ] ; |
|---|
| 112 | case "msvc" : |
|---|
| 113 | properties = [ impose-requirements $(properties) : <cxxflags>"-Gy" ] ; |
|---|
| 114 | } |
|---|
| 115 | return $(subvariant-path) $(properties) ; |
|---|
| 116 | } |
|---|
| 117 | |
|---|
| 118 | |
|---|