Minor tweaks to new intall process

This commit is contained in:
Strahinja Val Markovic 2013-02-07 19:09:53 -08:00
parent 2897d56d95
commit da8da52cdd
2 changed files with 12 additions and 3 deletions

View File

@ -41,12 +41,17 @@ if ( USE_CLANG_COMPLETER AND NOT USE_SYSTEM_LIBCLANG AND NOT PATH_TO_LLVM_ROOT )
else() else()
execute_process( COMMAND clang -dumpversion OUTPUT_VARIABLE CLANG_VERSION ) execute_process( COMMAND clang -dumpversion OUTPUT_VARIABLE CLANG_VERSION )
endif() endif()
if ( CLANG_VERSION VERSION_EQUAL 4.2 OR CLANG_VERSION VERSION_GREATER 4.2 ) if ( CLANG_VERSION VERSION_EQUAL 4.2 OR CLANG_VERSION VERSION_GREATER 4.2 )
# Good enough, use it. # Good enough, use it.
set( USE_SYSTEM_LIBCLANG ON ) set( USE_SYSTEM_LIBCLANG ON )
else() # If the wrong version, or not found, download message( "System libclang seems good enough, using it." )
message( "Downloading Clang 3.2" ) else()
# If the wrong version, or not found, download
message( "Downloading Clang 3.2 (system libclang not present or not good enough" )
set( CLANG_URL "http://llvm.org/releases/3.2" ) set( CLANG_URL "http://llvm.org/releases/3.2" )
if ( APPLE ) if ( APPLE )
set( CLANG_DIRNAME "clang+llvm-3.2-x86_64-apple-darwin11" ) set( CLANG_DIRNAME "clang+llvm-3.2-x86_64-apple-darwin11" )
set( CLANG_MD5 "fbdca3b4e8cdaa2352f2aeb038a16532" ) set( CLANG_MD5 "fbdca3b4e8cdaa2352f2aeb038a16532" )
@ -54,12 +59,16 @@ if ( USE_CLANG_COMPLETER AND NOT USE_SYSTEM_LIBCLANG AND NOT PATH_TO_LLVM_ROOT )
set( CLANG_DIRNAME "clang+llvm-3.2-x86_64-linux-ubuntu-12.04" ) set( CLANG_DIRNAME "clang+llvm-3.2-x86_64-linux-ubuntu-12.04" )
set( CLANG_MD5 "81821e339d7300afb76aca8edab2cf4f" ) set( CLANG_MD5 "81821e339d7300afb76aca8edab2cf4f" )
endif() endif()
set( CLANG_FILENAME "${CLANG_DIRNAME}.tar.gz" ) set( CLANG_FILENAME "${CLANG_DIRNAME}.tar.gz" )
file( file(
DOWNLOAD "${CLANG_URL}/${CLANG_FILENAME}" "./${CLANG_FILENAME}" DOWNLOAD "${CLANG_URL}/${CLANG_FILENAME}" "./${CLANG_FILENAME}"
SHOW_PROGRESS EXPECTED_MD5 "${CLANG_MD5}" SHOW_PROGRESS EXPECTED_MD5 "${CLANG_MD5}"
) )
execute_process( COMMAND tar -xzf ${CLANG_FILENAME} ) execute_process( COMMAND tar -xzf ${CLANG_FILENAME} )
# And set PATH_TO_LLVM_ROOT # And set PATH_TO_LLVM_ROOT
set( PATH_TO_LLVM_ROOT "${CMAKE_CURRENT_BINARY_DIR}/../${CLANG_DIRNAME}" ) set( PATH_TO_LLVM_ROOT "${CMAKE_CURRENT_BINARY_DIR}/../${CLANG_DIRNAME}" )
endif() endif()

View File

@ -25,7 +25,7 @@ function install {
ycm_dir=`pwd` ycm_dir=`pwd`
build_dir=`mktemp -d -t ycm_build` build_dir=`mktemp -d -t ycm_build`
pushd $build_dir pushd $build_dir
cmake $ycm_dir/cpp $1 cmake -G "Unix Makefiles" $1 . $ycm_dir/cpp
make ycm_core make ycm_core
popd popd
} }