Merge pull request #436 from junkblocker/patch-1
Allow easier system libclang use
This commit is contained in:
commit
2ed9ae7569
22
install.sh
22
install.sh
@ -102,25 +102,31 @@ function linux_cmake_install {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function usage {
|
function usage {
|
||||||
echo "Usage: $0 [--clang-completer]"
|
echo "Usage: $0 [--clang-completer [--system-libclang]]"
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ $# -gt 1 ]]; then
|
cmake_args=''
|
||||||
usage
|
while [ -n "$1" ]; do
|
||||||
fi
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--clang-completer)
|
--clang-completer)
|
||||||
cmake_args='-DUSE_CLANG_COMPLETER=ON'
|
cmake_args="$cmake_args -DUSE_CLANG_COMPLETER=ON"
|
||||||
|
shift
|
||||||
;;
|
;;
|
||||||
'')
|
--system-libclang)
|
||||||
cmake_args=''
|
cmake_args="$cmake_args -DUSE_SYSTEM_LIBCLANG=ON"
|
||||||
|
shift
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ $cmake_args == *-DUSE_SYSTEM_LIBCLANG=ON* ]] && \
|
||||||
|
[[ $cmake_args != *-DUSE_CLANG_COMPLETER=ON* ]]; then
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
|
||||||
if ! command_exists cmake; then
|
if ! command_exists cmake; then
|
||||||
echo "CMake is required to build YouCompleteMe."
|
echo "CMake is required to build YouCompleteMe."
|
||||||
|
Loading…
Reference in New Issue
Block a user