From e9b96912f18c3b319ed8140127166ff97bb3990b Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Fri, 3 Jan 2014 08:56:02 +0200 Subject: [PATCH] Set clang as the default C/C++/Obj-C/Obj-C++ compiler if gcc is not found. --- syntax_checkers/c/gcc.vim | 2 +- syntax_checkers/cpp/gcc.vim | 2 +- syntax_checkers/objc/gcc.vim | 2 +- syntax_checkers/objcpp/gcc.vim | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/syntax_checkers/c/gcc.vim b/syntax_checkers/c/gcc.vim index 0c15142b..1adca2ee 100644 --- a/syntax_checkers/c/gcc.vim +++ b/syntax_checkers/c/gcc.vim @@ -17,7 +17,7 @@ endif let g:loaded_syntastic_c_gcc_checker = 1 if !exists('g:syntastic_c_compiler') - let g:syntastic_c_compiler = 'gcc' + let g:syntastic_c_compiler = executable('gcc') ? 'gcc' : 'clang' endif function! SyntaxCheckers_c_gcc_IsAvailable() dict diff --git a/syntax_checkers/cpp/gcc.vim b/syntax_checkers/cpp/gcc.vim index 7b6e085b..586d022b 100644 --- a/syntax_checkers/cpp/gcc.vim +++ b/syntax_checkers/cpp/gcc.vim @@ -16,7 +16,7 @@ endif let g:loaded_syntastic_cpp_gcc_checker = 1 if !exists('g:syntastic_cpp_compiler') - let g:syntastic_cpp_compiler = 'g++' + let g:syntastic_cpp_compiler = executable('g++') ? 'g++' : 'clang' endif function! SyntaxCheckers_cpp_gcc_IsAvailable() dict diff --git a/syntax_checkers/objc/gcc.vim b/syntax_checkers/objc/gcc.vim index d9f9e805..3438e94f 100644 --- a/syntax_checkers/objc/gcc.vim +++ b/syntax_checkers/objc/gcc.vim @@ -16,7 +16,7 @@ endif let g:loaded_syntastic_objc_gcc_checker = 1 if !exists('g:syntastic_objc_compiler') - let g:syntastic_objc_compiler = 'gcc' + let g:syntastic_objc_compiler = executable('gcc') ? 'gcc' : 'clang' endif function! SyntaxCheckers_objc_gcc_IsAvailable() dict diff --git a/syntax_checkers/objcpp/gcc.vim b/syntax_checkers/objcpp/gcc.vim index 968db156..5984466e 100644 --- a/syntax_checkers/objcpp/gcc.vim +++ b/syntax_checkers/objcpp/gcc.vim @@ -16,7 +16,7 @@ endif let g:loaded_syntastic_objcpp_gcc_checker = 1 if !exists('g:syntastic_objcpp_compiler') - let g:syntastic_objcpp_compiler = 'gcc' + let g:syntastic_objcpp_compiler = executable('gcc') ? 'gcc' : 'clang' endif function! SyntaxCheckers_objcpp_gcc_IsAvailable() dict