@@ -6,8 +6,41 @@ parameters:
66- name : uhdGenerateTestBinaries
77 type : boolean
88 default : false
9+ - name : uhdCustomBoostPackage
10+ type : boolean
11+ default : false
12+ - name : uhdCustomBoostPackageURL
13+ type : string
14+ default : ' https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2'
915
1016steps :
17+ - ${{ if parameters.uhdCustomBoostPackage }} :
18+ - bash : |
19+ cd $(Pipeline.Workspace)
20+ echo "Entering workspace directory:"
21+ pwd
22+ rm -rf boost
23+ mkdir boost
24+ cd boost
25+ # We reimplement tar's -a flag here so we can pipe from curl straight to tar
26+ if [[ "${{ parameters.uhdCustomBoostPackageURL }}" =~ bz2$ ]]; then
27+ export TAR_EXTRACT_FLAG="j"
28+ elif [[ "${{ parameters.uhdCustomBoostPackageURL }}" =~ gz$ ]]; then
29+ export TAR_EXTRACT_FLAG="z"
30+ elif [[ "${{ parameters.uhdCustomBoostPackageURL }}" =~ xz$ ]]; then
31+ export TAR_EXTRACT_FLAG="J"
32+ fi
33+ curl -L ${{ parameters.uhdCustomBoostPackageURL }} | tar -x -$TAR_EXTRACT_FLAG
34+ export BOOST_DIR=`pwd`/`ls | head -1`
35+ echo "Using Boost directory: $BOOST_DIR"
36+ echo "##vso[task.setvariable variable=CustomBoostPath;isOutput=true;]$BOOST_DIR"
37+ cd $BOOST_DIR
38+ BOOST_INSTALL_DIR=${{ parameters.uhdBuildDir }}-boost
39+ ./bootstrap.sh --prefix=${BOOST_INSTALL_DIR} --includedir=headers --libdir=dist --with-libraries=chrono,date_time,filesystem,program_options,serialization,test,thread
40+ ./b2 -j$(nproc) --prefix=${BOOST_INSTALL_DIR} install
41+ displayName: "Build Custom Boost Version"
42+ name: build_boost_step
43+
1144 - script : |
1245 mkdir -p ${{ parameters.uhdBuildDir }}
1346 cd ${{ parameters.uhdBuildDir }}
@@ -26,9 +59,14 @@ steps:
2659 export UHD_CI_CMAKE_OPTIONS="-DCMAKE_INSTALL_PREFIX=${{ parameters.uhdBuildDir }}-installed"
2760 export UHD_CI_CMAKE_SIM="-DENABLE_SIM=OFF"
2861 fi
62+ if [[ "${{ parameters.uhdCustomBoostPackage }}" = "True" ]]; then
63+ BOOST_INSTALL_DIR=${{ parameters.uhdBuildDir }}-boost
64+ export UHD_BOOST_OPTIONS="-DCMAKE_PREFIX_PATH=$BOOST_INSTALL_DIR"
65+ fi
2966 cmake \
3067 $UHD_CI_CMAKE_OPTIONS \
3168 $UHD_CI_CMAKE_SIM \
69+ $UHD_BOOST_OPTIONS \
3270 ${{ parameters.uhdSrcDir }}/host
3371 displayName : cmake homebrew macOS UHD
3472
0 commit comments