-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathBUILD-boost
executable file
·89 lines (74 loc) · 2.29 KB
/
BUILD-boost
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/tcsh -fe
# BUILD-boost
# No libboost.pc package contents file is produced by this script
# Have not figured out how to compile the code in a dirrectory different from
# the distribution source code directory
set package = boost
set package_version = 1.56.0
set boost_dir = `pwd`/boost
set processors_available = `sysctl -n hw.ncpu`
set toolset = darwin
set architecture = x86
set address_model = 64
echo ""
echo ""
echo "Building package: $package"_"$package_version"
echo ""
echo ""
foreach directory ( build $package"_"$package_version $package_version )
if( -d $directory ) then
rm -fr $directory
endif
end
# Extraction below renames the top level directory, e.g., 1_56_0 to 1.56.0
mkdir $package"_"$package_version
tar xvjf $package"_"1_56_0.tar.bz2 -C $package"_"$package_version --strip-components 1
pushd $package"_"$package_version
#--with-icu=$icu_dir/$icu_version \
./bootstrap.sh \
--prefix=$boost_dir/$package_version \
--libdir=$boost_dir/$package_version/lib \
--with-toolset=$toolset \
--with-libraries=chrono,date_time,filesystem,iostreams,locale,program_options,regex,system,test,thread \
--show-libraries
# Setting $CC and $CXX environmental variables do nothing
# The line below is Boost's way of setting the compiler and its options for the build
cp ../modified-boost-build-club-project-config.jam project-config.jam
# "b2 behaves a as a "configure" and "make"
#-sICU_PATH=$icu_dir/$icu_version \
#-sICU_LINK="-L$icu_dir/$icu_version/lib -licui18n -licuuc -licudata -ldl" \
./b2 \
--prefix=$boost_dir/$package_version \
--libdir=$boost_dir/$package_version/lib \
--build-dir=$boost_dir/build \
install --reconfigure \
-j $processors_available \
toolset=$toolset \
architecture=$architecture \
address-model=$address_model \
link=static,shared \
cxxflags="-stdlib=libc++" \
linkflags="-stdlib=libc++" \
threading=multi \
variant=release \
-d0 \
-q \
-sBOOST_ROOT=$boost_dir/$package"_"$package_version \
boost.locale.iconv=off \
boost.locale.posix=off \
--with-chrono \
--with-date_time \
--with-filesystem \
--with-iostreams \
--with-locale \
--with-program_options \
--with-regex \
--with-system \
--with-thread \
--with-test
popd
echo ""
echo ""
echo "Finished building & installing: $package"_"$package_version"
echo ""
echo ""