-
Notifications
You must be signed in to change notification settings - Fork 3
/
build_mac_debug64.sh
31 lines (26 loc) · 1.09 KB
/
build_mac_debug64.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
BUILD_DIR=cmake-build64
BUILD_TYPE=Debug
PROJECT_DIR=$(pwd)
DRIVER_BIN_DIR="$PROJECT_DIR/build/odbc/bin"
DRIVER_LOG_DIR="$PROJECT_DIR/build/odbc/logs"
mkdir $DRIVER_LOG_DIR
mkdir $BUILD_DIR
cd $BUILD_DIR
cmake ../src -DCMAKE_BUILD_TYPE="$BUILD_TYPE" -DCODE_COVERAGE="ON" -DBUILD_SHARED_LIBS="OFF" -DWITH_TESTS="ON" -DWITH_ODBC="ON"
cd ..
# Download the DocumentDB JDBC Driver
read -r JDBC_DRIVER_VERSION < "${PROJECT_DIR}/src/JDBC_DRIVER_VERSION.txt"
JDBC_DRIVER_FILENAME="documentdb-jdbc-$JDBC_DRIVER_VERSION-all.jar"
JDBC_DRIVER_FULLPATH="$DRIVER_BIN_DIR/libs/$JDBC_DRIVER_FILENAME"
export DOCUMENTDB_HOME="$DRIVER_BIN_DIR"
if [ ! -f "$JDBC_DRIVER_FULLPATH" ]; then
mkdir "$DRIVER_BIN_DIR/libs"
echo "Downloading version $JDBC_DRIVER_VERSION of JDBC driver..."
curl -o "$DRIVER_BIN_DIR/libs/$JDBC_DRIVER_FILENAME" -L https://github.com/aws/amazon-documentdb-jdbc-driver/releases/download/v$JDBC_DRIVER_VERSION/$JDBC_DRIVER_FILENAME
echo "Download complete."
fi
#clean up the binary files used to generate code coverage report
find . -name "*.gcda" -type f -delete
cd cmake-build64
make -j 4
cd ..