-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
43 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,46 @@ | ||
#!/usr/bin/env bash | ||
set -xe | ||
|
||
# Build OSX from current directory. | ||
|
||
echo "Building libkafe for macOS" | ||
|
||
mkdir -p build/osx/ | ||
cd build/osx | ||
|
||
export CC=/usr/local/opt/llvm/bin/clang | ||
export CXX=/usr/local/opt/llvm/bin/clang++ | ||
if [[ -z "${KAFE_CC}" ]]; then | ||
if [ -f "/opt/homebrew/opt/llvm/bin/clang" ]; then | ||
export CC=/opt/homebrew/opt/llvm/bin/clang | ||
else | ||
export CC=/usr/local/opt/llvm/bin/clang | ||
fi | ||
echo "Will look for C compiler at ${CC}" | ||
else | ||
echo "Using preset C compiler from environment - KAFE_CC - ${KAFE_CC}" | ||
export CC=${KAFE_CC} | ||
fi | ||
|
||
if [[ -z "${KAFE_CXX}" ]]; then | ||
if [ -f "/opt/homebrew/opt/llvm/bin/clang++" ]; then | ||
export CXX=/opt/homebrew/opt/llvm/bin/clang++ | ||
else | ||
export CXX=/usr/local/opt/llvm/bin/clang++ | ||
fi | ||
echo "Will look for C++ compiler at ${CXX}" | ||
else | ||
echo "Using preset C++ compiler from environment - KAFE_CXX - ${KAFE_CXX}" | ||
export CXX=${KAFE_CXX} | ||
fi | ||
|
||
if [ ! -f "${CC}" ]; then | ||
echo "Fail: C compiler not found. Declare explicitly using KAFE_CC environment variable" | ||
exit 1 | ||
fi | ||
|
||
if [ ! -f "${CXX}" ]; then | ||
echo "Fail: C++ compiler not found. Declare explicitly using KAFE_CXX environment variable" | ||
exit 1 | ||
fi | ||
|
||
set -xe | ||
cmake ../.. | ||
make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters