File: build-boost.sh

package info (click to toggle)
opm-simulators 2025.10%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,460 kB
  • sloc: cpp: 193,029; sh: 1,807; python: 1,704; lisp: 1,108; makefile: 31; awk: 10
file content (31 lines) | stat: -rwxr-xr-x 618 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash

# This script is called from docker/Dockerfile to build the boost library.

set -e

BUILD_JOBS=$1
LIBTYPE=$2

if [ "$LIBTYPE" == "static" ]; then
    shared=0
else
    shared=1
fi

export CMAKE_GENERATOR=Ninja

pushd /tmp/opm

# Build boost
git clone --depth 1 --branch boost-1.84.0 https://github.com/boostorg/boost
pushd boost
git submodule init
git submodule update
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=$shared -DCMAKE_POSITION_INDEPENDENT_CODE=1 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=1
cmake --build . -j ${BUILD_JOBS}
cmake --build . --target install
popd
popd