diff --git a/syntax_checkers/cuda.vim b/syntax_checkers/cuda.vim index 816505eb..3f6c92bc 100644 --- a/syntax_checkers/cuda.vim +++ b/syntax_checkers/cuda.vim @@ -21,7 +21,12 @@ if !executable('nvcc') endif function! SyntaxCheckers_cuda_GetLocList() - let makeprg = 'nvcc --cuda -O0 -I . -Xcompiler -fsyntax-only '.shellescape(expand('%')).' -o /dev/null' + if exists('g:syntastic_cuda_arch') + let arch_flag = '-arch='.g:syntastic_cuda_arch + else + let arch_flag = '' + endif + let makeprg = 'nvcc '.arch_flag.' --cuda -O0 -I . -Xcompiler -fsyntax-only '.shellescape(expand('%')).' -o /dev/null' "let errorformat = '%-G%f:%s:,%f:%l:%c: %m,%f:%l: %m' let errorformat = '%*[^"]"%f"%*\D%l: %m,"%f"%*\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,"%f"\, line %l%*\D%c%*[^ ] %m,%D%*\a[%*\d]: Entering directory `%f'',%X%*\a[%*\d]: Leaving directory `%f'',%D%*\a: Entering directory `%f'',%X%*\a: Leaving directory `%f'',%DMaking %*\a in %f,%f|%l| %m'