Skip to content

Commit

Permalink
handle readlink for Mac/OSX microsoft#769
Browse files Browse the repository at this point in the history
  • Loading branch information
sytelus committed Feb 13, 2018
1 parent c894780 commit 1149015
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ if [ ! -d "./cmake_build" ]; then
exit 1
fi

CMAKE="$(readlink -f cmake_build/bin/cmake)"

# set up paths of clang compiler
if [ "$(uname)" == "Darwin" ]; then
CMAKE="$(greadlink -f cmake_build/bin/cmake)"

export CC=/usr/local/opt/llvm\@3.9/bin/clang
export CXX=/usr/local/opt/llvm\@3.9/bin/clang++
else
CMAKE="$(readlink -f cmake_build/bin/cmake)"

export CC="clang-3.9"
export CXX="clang++-3.9"
fi
Expand Down
8 changes: 7 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ if [ "$(uname)" == "Darwin" ]; then
brew install --force-bottle llvm@3.9

brew install wget
brew install coreutils

export C_COMPILER=/usr/local/opt/llvm\@3.9/bin/clang
export COMPILER=/usr/local/opt/llvm\@3.9/bin/clang++
Expand Down Expand Up @@ -57,7 +58,12 @@ if [[ ! -d "cmake_build/bin" ]]; then
make
popd
fi
CMAKE="$(readlink -f cmake_build/bin/cmake)"

if [ "$(uname)" == "Darwin" ]; then
CMAKE="$(greadlink -f cmake_build/bin/cmake)"
else
CMAKE="$(readlink -f cmake_build/bin/cmake)"
fi

# Download rpclib
if [ ! -d "external/rpclib/rpclib-2.2.1" ]; then
Expand Down

0 comments on commit 1149015

Please sign in to comment.