fix custom c++ compiler options
This commit is contained in:
parent
7a5bca349c
commit
85c347c14f
@ -65,10 +65,16 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_cpp_GetLocList()
|
||||
let makeprg = 'g++ -fsyntax-only '.shellescape(expand('%')).
|
||||
\ ' ' . syntastic#c#GetIncludeDirs(1)
|
||||
let makeprg = 'g++ -fsyntax-only '
|
||||
let errorformat = '%-G%f:%s:,%f:%l:%c: %m,%f:%l: %m'
|
||||
|
||||
if exists('g:syntastic_cpp_compiler_options')
|
||||
let makeprg .= g:syntastic_cpp_compiler_options
|
||||
endif
|
||||
|
||||
let makeprg .= ' ' . shellescape(expand('%')) .
|
||||
\ ' ' . syntastic#c#GetIncludeDirs(1)
|
||||
|
||||
if expand('%') =~? '\%(.h\|.hpp\|.hh\)$'
|
||||
if exists('g:syntastic_cpp_check_header')
|
||||
let makeprg = 'g++ -c '.shellescape(expand('%')).
|
||||
@ -78,10 +84,6 @@ function! SyntaxCheckers_cpp_GetLocList()
|
||||
endif
|
||||
endif
|
||||
|
||||
if exists('g:syntastic_cpp_compiler_options')
|
||||
let makeprg .= g:syntastic_cpp_compiler_options
|
||||
endif
|
||||
|
||||
if !exists('b:syntastic_cpp_cflags')
|
||||
if !exists('g:syntastic_cpp_no_include_search') ||
|
||||
\ g:syntastic_cpp_no_include_search != 1
|
||||
|
Loading…
Reference in New Issue
Block a user