Mercurial > hg > orthanc-object-storage
annotate Aws/holy-build-box-internal.sh @ 197:df0b6998fd27
integration 2.3.0: back to mainline
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 25 Jun 2024 12:38:31 +0200 |
parents | 3c7e0374f28e |
children |
rev | line source |
---|---|
58 | 1 #!/bin/bash |
2 | |
3 # Cloud storage plugins for Orthanc | |
145
3c7e0374f28e
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
141
diff
changeset
|
4 # Copyright (C) 2020-2023 Osimis S.A., Belgium |
3c7e0374f28e
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
141
diff
changeset
|
5 # Copyright (C) 2024-2024 Orthanc Team SRL, Belgium |
3c7e0374f28e
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
141
diff
changeset
|
6 # Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
58 | 7 # |
8 # This program is free software: you can redistribute it and/or | |
9 # modify it under the terms of the GNU Affero General Public License | |
10 # as published by the Free Software Foundation, either version 3 of | |
11 # the License, or (at your option) any later version. | |
12 # | |
13 # This program is distributed in the hope that it will be useful, but | |
14 # WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 # Affero General Public License for more details. | |
17 # | |
18 # You should have received a copy of the GNU Affero General Public License | |
19 # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
20 | |
21 | |
22 set -e | |
23 | |
24 # Activate Holy Build Box environment. | |
25 source /hbb_exe/activate | |
26 | |
27 set -ex | |
28 | |
29 mkdir /tmp/build | |
30 cd /tmp/build | |
31 | |
32 # Holy Build Box defines LDFLAGS as "-L/hbb_exe/lib | |
33 # -static-libstdc++". The "-L/hbb_exe/lib" option results in linking | |
34 # errors "undefined reference" to `std::__once_callable', | |
35 # 'std::__once_call' and '__once_proxy'. | |
36 export LDFLAGS=-static-libstdc++ | |
37 unset LDPATHFLAGS | |
38 unset SHLIB_LDFLAGS | |
39 unset LD_LIBRARY_PATH | |
40 unset LIBRARY_PATH | |
41 | |
42 mkdir -p /tmp/source-writeable/Aws | |
43 | |
44 cp -r /source/Common /tmp/source-writeable/ | |
45 cp -r /source/UnitTestsSources /tmp/source-writeable/ | |
46 cp /source/Aws/* /tmp/source-writeable/Aws/ || true # Ignore error about omitting directories | |
47 | |
48 cmake /tmp/source-writeable/Aws/ \ | |
140 | 49 -DORTHANC_FRAMEWORK_VERSION=1.12.3 \ |
58 | 50 -DORTHANC_FRAMEWORK_SOURCE=web \ |
51 -DCMAKE_BUILD_TYPE=$1 -DSTATIC_BUILD=ON | |
52 | |
53 # Use only 2 processes (not `nproc`), as this is a very heavy compilation | |
141
3e9cced85a5b
fix build for MSVC 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
140
diff
changeset
|
54 # make -j2 |
3e9cced85a5b
fix build for MSVC 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
140
diff
changeset
|
55 |
3e9cced85a5b
fix build for MSVC 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
140
diff
changeset
|
56 make -j`nproc --all` |
58 | 57 |
58 ./UnitTests | |
59 | |
60 if [ "$1" == "Release" ]; then | |
61 strip ./libOrthancAwsS3Storage.so | |
62 fi | |
63 | |
64 cp ./libOrthancAwsS3Storage.so /target/ | |
65 cp ./UnitTests /target/ |