2929#
3030# ===============================================================================
3131
32- BOOST_VERSION=1.67 .0
32+ BOOST_VERSION=1.69 .0
3333
34- BOOST_LIBS=" atomic chrono date_time exception filesystem program_options random signals system thread test"
35- ALL_BOOST_LIBS =\
34+ BOOST_LIBS=" atomic chrono date_time exception filesystem program_options random system thread test"
35+ ALL_BOOST_LIBS_1_68 =\
3636" atomic chrono container context coroutine coroutine2 date_time exception fiber filesystem graph" \
3737" graph_parallel iostreams locale log math metaparse mpi program_options python random regex" \
3838" serialization signals system test thread timer type_erasure wave"
39+ ALL_BOOST_LIBS_1_69=\
40+ " atomic chrono container context coroutine coroutine2 date_time exception fiber filesystem graph" \
41+ " graph_parallel iostreams locale log math metaparse mpi program_options python random regex" \
42+ " serialization signals2 system test thread timer type_erasure wave"
3943BOOTSTRAP_LIBS=" "
4044
4145MIN_IOS_VERSION=10.0
@@ -101,7 +105,7 @@ OPTIONS:
101105
102106 -tvos
103107 Build for the tvOS platform.
104-
108+
105109 --boost-version [num]
106110 Specify which version of Boost to build.
107111 Defaults to $BOOST_VERSION .
@@ -419,7 +423,12 @@ parseArgs()
419423 if [[ " $CUSTOM_LIBS " == " none" ]]; then
420424 CUSTOM_LIBS=
421425 elif [[ " $CUSTOM_LIBS " == " all" ]]; then
422- CUSTOM_LIBS=$ALL_BOOST_LIBS
426+ boostParts=(${BOOST_VERSION// \. / } )
427+ if [[ ${boostParts[1]} < 69 ]]; then
428+ CUSTOM_LIBS=$ALL_BOOST_LIBS_1_68
429+ else
430+ CUSTOM_LIBS=$ALL_BOOST_LIBS_1_69
431+ fi
423432 fi
424433 BOOST_LIBS=$CUSTOM_LIBS
425434 fi
@@ -620,22 +629,22 @@ buildBoost_iOS()
620629 # Install this one so we can copy the headers for the frameworks...
621630 ./b2 $THREADS --build-dir=iphone-build --stagedir=iphone-build/stage \
622631 --prefix=" $IOS_OUTPUT_DIR /prefix" toolset=darwin \
623- cxxflags=" ${CXX_FLAGS} ${IOS_ARCH_FLAGS} " architecture=arm target-os=iphone \
632+ cxxflags=" ${CXX_FLAGS} ${IOS_ARCH_FLAGS} " architecture=arm target-os=iphone linkflags= " -stdlib=libc++ " \
624633 macosx-version=iphone-${IOS_SDK_VERSION} define=_LITTLE_ENDIAN \
625634 link=static variant=${BUILD_VARIANT} stage >> " ${IOS_OUTPUT_DIR} /ios-build.log" 2>&1
626635 if [ $? != 0 ]; then echo " Error staging iPhone. Check log." ; exit 1; fi
627636
628637 ./b2 $THREADS --build-dir=iphone-build --stagedir=iphone-build/stage \
629638 --prefix=" $IOS_OUTPUT_DIR /prefix" toolset=darwin \
630- cxxflags=" ${CXX_FLAGS} ${IOS_ARCH_FLAGS} " architecture=arm \
639+ cxxflags=" ${CXX_FLAGS} ${IOS_ARCH_FLAGS} " architecture=arm linkflags= " -stdlib=libc++ " \
631640 target-os=iphone macosx-version=iphone-${IOS_SDK_VERSION} \
632641 define=_LITTLE_ENDIAN link=static variant=${BUILD_VARIANT} install >> " ${IOS_OUTPUT_DIR} /ios-build.log" 2>&1
633642 if [ $? != 0 ]; then echo " Error installing iPhone. Check log." ; exit 1; fi
634643 doneSection
635644
636645 echo Building Boost for iPhoneSimulator
637646 ./b2 $THREADS --build-dir=iphonesim-build --stagedir=iphonesim-build/stage \
638- toolset=darwin-${IOS_SDK_VERSION} ~iphonesim cxxflags=" ${CXX_FLAGS} " architecture=x86 \
647+ toolset=darwin-${IOS_SDK_VERSION} ~iphonesim cxxflags=" ${CXX_FLAGS} " architecture=x86 linkflags= " -stdlib=libc++ " \
639648 target-os=iphone macosx-version=iphonesim-${IOS_SDK_VERSION} \
640649 link=static variant=${BUILD_VARIANT} stage >> " ${IOS_OUTPUT_DIR} /ios-build.log" 2>&1
641650 if [ $? != 0 ]; then echo " Error staging iPhoneSimulator. Check log." ; exit 1; fi
@@ -650,21 +659,21 @@ buildBoost_tvOS()
650659 echo Building Boost for AppleTV
651660 ./b2 $THREADS --build-dir=appletv-build --stagedir=appletv-build/stage \
652661 --prefix=" $TVOS_OUTPUT_DIR /prefix" toolset=darwin-${TVOS_SDK_VERSION} ~appletv \
653- cxxflags=" ${CXX_FLAGS} " architecture=arm target-os=iphone define=_LITTLE_ENDIAN \
662+ cxxflags=" ${CXX_FLAGS} " architecture=arm target-os=iphone define=_LITTLE_ENDIAN linkflags= " -stdlib=libc++ " \
654663 link=static variant=${BUILD_VARIANT} stage >> " ${TVOS_OUTPUT_DIR} /tvos-build.log" 2>&1
655664 if [ $? != 0 ]; then echo " Error staging AppleTV. Check log." ; exit 1; fi
656665
657666 ./b2 $THREADS --build-dir=appletv-build --stagedir=appletv-build/stage \
658667 --prefix=" $TVOS_OUTPUT_DIR /prefix" toolset=darwin-${TVOS_SDK_VERSION} ~appletv \
659- cxxflags=" ${CXX_FLAGS} " architecture=arm target-os=iphone define=_LITTLE_ENDIAN \
668+ cxxflags=" ${CXX_FLAGS} " architecture=arm target-os=iphone define=_LITTLE_ENDIAN linkflags= " -stdlib=libc++ " \
660669 link=static variant=${BUILD_VARIANT} install >> " ${TVOS_OUTPUT_DIR} /tvos-build.log" 2>&1
661670 if [ $? != 0 ]; then echo " Error installing AppleTV. Check log." ; exit 1; fi
662671 doneSection
663672
664673 echo Building Boost for AppleTVSimulator
665674 ./b2 $THREADS --build-dir=appletv-build --stagedir=appletvsim-build/stage \
666675 toolset=darwin-${TVOS_SDK_VERSION} ~appletvsim architecture=x86 \
667- cxxflags=" ${CXX_FLAGS} " target-os=iphone link=static variant=${BUILD_VARIANT} \
676+ cxxflags=" ${CXX_FLAGS} " target-os=iphone link=static variant=${BUILD_VARIANT} linkflags= " -stdlib=libc++ " \
668677 stage >> " ${TVOS_OUTPUT_DIR} /tvos-build.log" 2>&1
669678 if [ $? != 0 ]; then echo " Error staging AppleTVSimulator. Check log." ; exit 1; fi
670679 doneSection
0 commit comments