annotate OrthancFramework/Resources/CMake/BoostConfiguration.sh @ 5188:4c6f0211caaf db-protobuf

compiling the protobuf compiler
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 26 Mar 2023 21:09:13 +0200
parents 6156a970a2e1
children dc8fe64a452f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
553
27d32fc6209a simplifications to cmake, use a digest of boost 1.54.0 thanks bcp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 #!/bin/bash
27d32fc6209a simplifications to cmake, use a digest of boost 1.54.0 thanks bcp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
27d32fc6209a simplifications to cmake, use a digest of boost 1.54.0 thanks bcp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 set -e
27d32fc6209a simplifications to cmake, use a digest of boost 1.54.0 thanks bcp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 set -u
27d32fc6209a simplifications to cmake, use a digest of boost 1.54.0 thanks bcp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5
27d32fc6209a simplifications to cmake, use a digest of boost 1.54.0 thanks bcp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 ## Starting with version 0.6.2, Orthanc is shipped with a subset of the
27d32fc6209a simplifications to cmake, use a digest of boost 1.54.0 thanks bcp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 ## Boost libraries that is generated with the BCP tool:
27d32fc6209a simplifications to cmake, use a digest of boost 1.54.0 thanks bcp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 ##
27d32fc6209a simplifications to cmake, use a digest of boost 1.54.0 thanks bcp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 ## http://www.boost.org/doc/libs/1_54_0/tools/bcp/doc/html/index.html
27d32fc6209a simplifications to cmake, use a digest of boost 1.54.0 thanks bcp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 ##
27d32fc6209a simplifications to cmake, use a digest of boost 1.54.0 thanks bcp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 ## This script generates this subset.
753
a6576b478553 upgrade to boost 1.55.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 560
diff changeset
12 ##
a6576b478553 upgrade to boost 1.55.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 560
diff changeset
13 ## History:
a6576b478553 upgrade to boost 1.55.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 560
diff changeset
14 ## - Orthanc between 0.6.2 and 0.7.3: Boost 1.54.0
1473
0631b56c35eb Update to Boost 1.58.0 for static and Windows builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 753
diff changeset
15 ## - Orthanc between 0.7.4 and 0.9.1: Boost 1.55.0
1830
2921384cc352 Upgrade to Boost 1.59.0 for static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1473
diff changeset
16 ## - Orthanc between 0.9.2 and 0.9.4: Boost 1.58.0
1931
687ff92d173b Upgrade to Boost 1.60.0 for static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1830
diff changeset
17 ## - Orthanc between 0.9.5 and 1.0.0: Boost 1.59.0
2326
423d3b692bb9 Upgrade to Boost 1.64.0, and Toolbox::ToUpperCaseWithAccents
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1990
diff changeset
18 ## - Orthanc between 1.1.0 and 1.2.0: Boost 1.60.0
2432
5a650eef0794 Upgrade to Boost 1.65.1 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2354
diff changeset
19 ## - Orthanc 1.3.0: Boost 1.64.0
2525
94423976888e boost 1.66.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2432
diff changeset
20 ## - Orthanc 1.3.1: Boost 1.65.1
2679
ee9a6cd63891 boost 1.67.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2527
diff changeset
21 ## - Orthanc 1.3.2: Boost 1.66.0
2930
8341256c6941 upgrade to Boost 1.68 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2679
diff changeset
22 ## - Orthanc between 1.4.0 and 1.4.2: Boost 1.67.0
3282
e8ce77f3dec1 upgrade to Boost 1.69.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2988
diff changeset
23 ## - Orthanc between 1.5.0 and 1.5.4: Boost 1.68.0
5064
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
24 ## - Orthanc between 1.5.5 and 1.11.1: Boost 1.69.0
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
25 ## - Orthanc >= 1.11.2: Boost 1.80.0
553
27d32fc6209a simplifications to cmake, use a digest of boost 1.54.0 thanks bcp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26
5064
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
27 BOOST_VERSION=1_80_0
6156a970a2e1 upgrade to Boost 1.80.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
28 ORTHANC_VERSION=1.11.2
2432
5a650eef0794 Upgrade to Boost 1.65.1 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2354
diff changeset
29
5a650eef0794 Upgrade to Boost 1.65.1 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2354
diff changeset
30 rm -rf /tmp/boost_${BOOST_VERSION}
5a650eef0794 Upgrade to Boost 1.65.1 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2354
diff changeset
31 rm -rf /tmp/bcp/boost_${BOOST_VERSION}
553
27d32fc6209a simplifications to cmake, use a digest of boost 1.54.0 thanks bcp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
27d32fc6209a simplifications to cmake, use a digest of boost 1.54.0 thanks bcp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 cd /tmp
2432
5a650eef0794 Upgrade to Boost 1.65.1 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2354
diff changeset
34 echo "Uncompressing the sources of Boost ${BOOST_VERSION}..."
5a650eef0794 Upgrade to Boost 1.65.1 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2354
diff changeset
35 tar xfz ./boost_${BOOST_VERSION}.tar.gz
553
27d32fc6209a simplifications to cmake, use a digest of boost 1.54.0 thanks bcp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36
27d32fc6209a simplifications to cmake, use a digest of boost 1.54.0 thanks bcp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 echo "Generating the subset..."
2432
5a650eef0794 Upgrade to Boost 1.65.1 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2354
diff changeset
38 mkdir -p /tmp/bcp/boost_${BOOST_VERSION}
3313
3e0ad879eba2 added chrono library in Boost for Stone
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3282
diff changeset
39 bcp --boost=/tmp/boost_${BOOST_VERSION} thread system locale date_time filesystem math/special_functions algorithm uuid atomic iostreams program_options numeric/ublas geometry polygon signals2 chrono /tmp/bcp/boost_${BOOST_VERSION}
2527
a6c2d8a2a2ec remove filenames too long for Windows in Boost
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2525
diff changeset
40
a6c2d8a2a2ec remove filenames too long for Windows in Boost
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2525
diff changeset
41 echo "Removing documentation..."
2679
ee9a6cd63891 boost 1.67.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2527
diff changeset
42 rm -rf /tmp/bcp/boost_${BOOST_VERSION}/libs/locale/doc/html
ee9a6cd63891 boost 1.67.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2527
diff changeset
43 rm -rf /tmp/bcp/boost_${BOOST_VERSION}/libs/algorithm/doc/html
ee9a6cd63891 boost 1.67.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2527
diff changeset
44 rm -rf /tmp/bcp/boost_${BOOST_VERSION}/libs/geometry/doc/html
ee9a6cd63891 boost 1.67.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2527
diff changeset
45 rm -rf /tmp/bcp/boost_${BOOST_VERSION}/libs/geometry/doc/doxy/doxygen_output/html
ee9a6cd63891 boost 1.67.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2527
diff changeset
46 rm -rf /tmp/bcp/boost_${BOOST_VERSION}/libs/filesystem/example/
2527
a6c2d8a2a2ec remove filenames too long for Windows in Boost
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2525
diff changeset
47
a6c2d8a2a2ec remove filenames too long for Windows in Boost
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2525
diff changeset
48 # https://stackoverflow.com/questions/1655372/longest-line-in-a-file
a6c2d8a2a2ec remove filenames too long for Windows in Boost
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2525
diff changeset
49 LONGEST_FILENAME=`find /tmp/bcp/ | awk '{print length, $0}' | sort -nr | head -1`
a6c2d8a2a2ec remove filenames too long for Windows in Boost
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2525
diff changeset
50 LONGEST=`echo "$LONGEST_FILENAME" | cut -d ' ' -f 1`
a6c2d8a2a2ec remove filenames too long for Windows in Boost
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2525
diff changeset
51
a6c2d8a2a2ec remove filenames too long for Windows in Boost
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2525
diff changeset
52 echo
a6c2d8a2a2ec remove filenames too long for Windows in Boost
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2525
diff changeset
53 echo "Longest filename (${LONGEST} characters):"
a6c2d8a2a2ec remove filenames too long for Windows in Boost
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2525
diff changeset
54 echo "${LONGEST_FILENAME}"
a6c2d8a2a2ec remove filenames too long for Windows in Boost
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2525
diff changeset
55 echo
a6c2d8a2a2ec remove filenames too long for Windows in Boost
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2525
diff changeset
56
a6c2d8a2a2ec remove filenames too long for Windows in Boost
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2525
diff changeset
57 if [ ${LONGEST} -ge 128 ]; then
a6c2d8a2a2ec remove filenames too long for Windows in Boost
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2525
diff changeset
58 echo "ERROR: Too long filename for Windows!"
a6c2d8a2a2ec remove filenames too long for Windows in Boost
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2525
diff changeset
59 echo
a6c2d8a2a2ec remove filenames too long for Windows in Boost
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2525
diff changeset
60 exit -1
a6c2d8a2a2ec remove filenames too long for Windows in Boost
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2525
diff changeset
61 fi
553
27d32fc6209a simplifications to cmake, use a digest of boost 1.54.0 thanks bcp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62
27d32fc6209a simplifications to cmake, use a digest of boost 1.54.0 thanks bcp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 echo "Compressing the subset..."
2527
a6c2d8a2a2ec remove filenames too long for Windows in Boost
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2525
diff changeset
64 cd /tmp/bcp
2432
5a650eef0794 Upgrade to Boost 1.65.1 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2354
diff changeset
65 tar cfz boost_${BOOST_VERSION}_bcpdigest-${ORTHANC_VERSION}.tar.gz boost_${BOOST_VERSION}
5a650eef0794 Upgrade to Boost 1.65.1 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2354
diff changeset
66 ls -l boost_${BOOST_VERSION}_bcpdigest-${ORTHANC_VERSION}.tar.gz
5a650eef0794 Upgrade to Boost 1.65.1 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2354
diff changeset
67 md5sum boost_${BOOST_VERSION}_bcpdigest-${ORTHANC_VERSION}.tar.gz
5a650eef0794 Upgrade to Boost 1.65.1 in static builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2354
diff changeset
68 readlink -f boost_${BOOST_VERSION}_bcpdigest-${ORTHANC_VERSION}.tar.gz