add compiler options to C header checking too
This commit is contained in:
parent
acb35ec088
commit
1bbfbeb3a3
@ -106,8 +106,9 @@ function! SyntaxCheckers_c_GetLocList()
|
||||
" determine whether to parse header files as well
|
||||
if expand('%') =~? '.h$'
|
||||
if exists('g:syntastic_c_check_header')
|
||||
let makeprg = 'gcc -c '.shellescape(expand('%')).
|
||||
\ ' '.syntastic#c#GetIncludeDirs('c')
|
||||
let makeprg = 'gcc -c '.shellescape(expand('%')) .
|
||||
\ ' ' . g:syntastic_c_compiler_options .
|
||||
\ ' ' . syntastic#c#GetIncludeDirs('c')
|
||||
else
|
||||
return []
|
||||
endif
|
||||
|
@ -66,7 +66,7 @@
|
||||
"
|
||||
" Set your compiler executable with e.g. (defaults to g++)
|
||||
"
|
||||
" let g:syntastic_cpp_compiler = 'clang++'
|
||||
" let g:syntastic_cpp_compiler = 'clang++'
|
||||
|
||||
if exists('loaded_cpp_syntax_checker')
|
||||
finish
|
||||
@ -107,8 +107,8 @@ function! SyntaxCheckers_cpp_GetLocList()
|
||||
|
||||
if expand('%') =~? '\%(.h\|.hpp\|.hh\)$'
|
||||
if exists('g:syntastic_cpp_check_header')
|
||||
let makeprg = g:syntastic_cpp_compiler.' -c '.shellescape(expand('%')).
|
||||
\ ' ' . g:syntastic_cpp_compiler_options.
|
||||
let makeprg = g:syntastic_cpp_compiler.' -c '.shellescape(expand('%')) .
|
||||
\ ' ' . g:syntastic_cpp_compiler_options .
|
||||
\ ' ' . syntastic#c#GetIncludeDirs('cpp')
|
||||
else
|
||||
return []
|
||||
|
Loading…
x
Reference in New Issue
Block a user