-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathdo-all-unix.sh
executable file
·53 lines (42 loc) · 1.52 KB
/
do-all-unix.sh
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
#!/bin/bash
# Builds, tests and installs the library, and verifies the installation on UNIX-like platforms
# The script should be run from the project's root directory
#
# This environment variables are the parameters to this script:
# - BIT_VERSION : target platform architecture (32 or 64)
# - BUILD_TYPE : Release, Debug, etc.
# - LIBRARY_TYPE : SHARED or STATIC
# - WITH_OPENSSL : ON or OFF
# - COVERAGE: ON or OFF
#
# exit if a command returns non-zero status
set -e
export BUILD_DIR=build
export INSTALL=ON
# treat compiler warnings as errors when the build type is Debug
if [ "$BUILD_TYPE" == "Debug" ]; then
export WARN_AS_ERR=ON
fi
DESTINATION=$(pwd)/destination
# set BUILD_SHARED_LIBS depending on LIBRARY_TYPE
BUILD_SHARED_LIBS=ON
if [ "$LIBRARY_TYPE" == "STATIC" ]; then
BUILD_SHARED_LIBS=OFF;
fi
./scripts/build-unix.sh \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX=$DESTINATION \
-DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS \
-DWITH_OPENSSL=$WITH_OPENSSL \
-DBUILD_TESTS=ON \
-DBUILD_EXAMPLES=OFF
./scripts/test-unix.sh
if [ "$COVERAGE" == "ON" ]; then
gcovr --xml-pretty -o cpp_coverage.xml \
--delete \
-r "$(pwd)/hazelcast" -e "$(pwd)/hazelcast/test" \
"$(pwd)/$BUILD_DIR"
fi
export BUILD_DIR=build-examples
./scripts/verify-installation-unix.sh \
-DCMAKE_PREFIX_PATH=$DESTINATION -DWITH_OPENSSL=$WITH_OPENSSL