Move ext/* to scripts/

This commit is contained in:
Henrik Lissner 2017-01-16 23:13:12 -05:00
parent e8438e11e5
commit 83c852e11f
7 changed files with 0 additions and 0 deletions

48
scripts/setup-cc.sh Executable file
View file

@ -0,0 +1,48 @@
#!/usr/bin/env bash
source VARS
#
echo "Setting up C/C++ (irony-mode)"
case "$OSTYPE" in
darwin*)
brew install cmake
brew install llvm --with-clang
;;
linux*)
if is-arch; then
sudo pacman --noconfirm -S cmake clang
elif is-deb; then
echo "Not implemented"
exit 1
fi
;;
esac
# Build irony-server
git-repo "https://github.com/Sarcasm/irony-mode" "irony-mode"
# Reset build directory
cd irony-mode/server
[ -d build ] && rm -rf build
mkdir build && cd build
DEST="$(pwd)/irony-mode/server/build/irony/"
# Compile
if is-mac
then
cmake -DCMAKE_INSTALL_RPATH_USE_LINK_PATH\=ON \
-DCMAKE_INSTALL_PREFIX\="$DEST" ../
else
cmake -DCMAKE_INSTALL_PREFIX\="$DEST" ../
fi
cmake --build . --use-stderr --config Release --target install
if is-mac
then
install_name_tool -change @rpath/libclang.dylib \
/usr/local/opt/llvm/lib/libclang.dylib \
$DEST/bin/irony-server
fi