Boost logo

Boost Users :

Subject: Re: [Boost-users] How to build modular boost for android?
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-01-18 20:15:09

On 16 Jan 2015 at 15:53, Robert Dailey wrote:

> How do I build modular boost for android? I have it checked out from
> github at the 1.57 tag. I don't see a user-config.jam file, except for
> at "tools/build/example/user-config.jam". The structure is completely
> changed, where do I need to make changes? What changes do I make?
> Any guidance is appreciated. I'm no where near an expert here, I just
> need a quick ad-hoc solution. Thanks.

Below is the shell script that the nightly Boost.Thread CI build bot
does. This includes multiple Android targets, including 5.0 clang and
gcc targets plus a 2.0 target. Hope it's useful.


B2FLAGS="libs/thread/build release -a link=$LINKTYPE
cxxflags=-std=$CPPSTD cxxflags=-Wno-unused-parameter"

if [ "$label" = "android-ndk" ]; then
  if [ "$CXX" != "${CXX#clang++}" ]; then
    export PATH=$HOME/toolchain-android-5.0-clang35/bin:$PATH
    export CXX=arm-linux-androideabi-clang++
    B2FLAGS="$B2FLAGS toolset=clang target-os=android"
  elif [ "4.8" = "${CXX#g++-}" ]; then
    export PATH=$HOME/toolchain-android-5.0-gcc48/bin:$PATH
    export CXX=arm-linux-androideabi-g++
    B2FLAGS="$B2FLAGS toolset=gcc target-os=android"
    export PATH=$HOME/toolchain-android-2.0/bin:$PATH
    export CXX=arm-linux-androideabi-g++
    B2FLAGS="$B2FLAGS toolset=gcc target-os=android"
  if [ "$CXX" = "clang++-analyse" ]; then
    rm -rf "clangScanBuildReport"
    rm -rf "boost-local/clangScanBuildReports"
    B2FLAGS="$B2FLAGS toolset=clang"
    export CXX=g++-4.9
    PREFIX="/usr/share/clang/scan-build-3.5/scan-build -o
clangScanBuildReports -analyze-headers
--use-analyzer=/usr/bin/clang-3.5 --use-c++=/usr/bin/g++-4.9"
  elif [ "$CXX" != "${CXX#clang++}" ]; then
    B2FLAGS="$B2FLAGS toolset=clang"
    B2FLAGS="$B2FLAGS toolset=gcc"

if [ "$CXXFLAGS" != "" ]; then B2FLAGS="$B2FLAGS
cxxflags=\"$CXXFLAGS\""; fi
if [ "$LINKFLAGS" != "" ]; then B2FLAGS="$B2FLAGS
linkflags=\"$LINKFLAGS\""; fi
git submodule update --init --recursive
cd boost-local
if [ -d "clangScanBuildReports" ]; then
  mkdir -p ../clangScanBuildReport
  mv clangScanBuildReports/*/* ../clangScanBuildReport/
exit $FAILED

ned Productions Limited Consulting

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at