forked from Azure/azure-storage-fuse
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·27 lines (24 loc) · 805 Bytes
/
Copy pathbuild.sh
File metadata and controls
executable file
·27 lines (24 loc) · 805 Bytes
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
#!/usr/bin/env bash
BLOBFS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
## Use "export INCLUDE_TESTS=1" to enable building tests
cmake_args='-DCMAKE_BUILD_TYPE=RelWithDebInfo ..'
if [ -n "${INCLUDE_TESTS}" ]; then
cmake_args='-DCMAKE_BUILD_TYPE=RelWithDebInfo -DINCLUDE_TESTS=1 ..'
fi
## install pkg-config, cmake, libcurl and libfuse first
## For example, on ubuntu - sudo apt-get install pkg-config libfuse-dev cmake libcurl4-openssl-dev -y
mkdir build
cd build
## Use cmake3 if it's available. If not, then fallback to the default "cmake". Otherwise, fail.
cmake3 $cmake_args
if [ $? -ne 0 ]
then
cmake $cmake_args
fi
if [ $? -ne 0 ]
then
ERRORCODE=$?
echo "cmake failed. Please ensure that cmake version 3.5 or greater is installed and available."
exit $ERRORCODE
fi
make