omnisharp build added to install script
This commit is contained in:
parent
485457af5d
commit
8066bdc29b
33
install.sh
33
install.sh
@ -102,25 +102,29 @@ function linux_cmake_install {
|
||||
}
|
||||
|
||||
function usage {
|
||||
echo "Usage: $0 [--clang-completer]"
|
||||
echo "Usage: $0 [--clang-completer] [--cs-completer]"
|
||||
exit 0
|
||||
}
|
||||
|
||||
if [[ $# -gt 1 ]]; then
|
||||
if [[ $# -gt 2 ]]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
cmake_args=''
|
||||
omnisharp_completer=false
|
||||
for flag in $@; do
|
||||
case "$flag" in
|
||||
--clang-completer)
|
||||
cmake_args='-DUSE_CLANG_COMPLETER=ON'
|
||||
;;
|
||||
'')
|
||||
cmake_args=''
|
||||
--omnisharp-completer)
|
||||
omnisharp_completer=true
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
done
|
||||
|
||||
if ! command_exists cmake; then
|
||||
echo "CMake is required to build YouCompleteMe."
|
||||
@ -133,3 +137,20 @@ else
|
||||
testrun $cmake_args $EXTRA_CMAKE_ARGS
|
||||
fi
|
||||
|
||||
if $omnisharp_completer; then
|
||||
buildcommand="msbuild"
|
||||
if ! command_exists msbuild; then
|
||||
buildcommand="xbuild"
|
||||
if ! command_exists xbuild; then
|
||||
echo "msbuild or xbuild is required to build Omnisharp"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
ycm_dir=`pwd`
|
||||
build_dir=$ycm_dir"/python/ycm/completers/cs/OmniSharpServer"
|
||||
|
||||
cd $build_dir
|
||||
$buildcommand
|
||||
cd $ycm_dir
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user