In syntastic I can do something like that
let g:syntastic_cpp_compiler_options = ' -std=c++11'
Is there any possiblity to achieve the same idea with Neomake?
I spent a few hours figuring this out for myself. How I did it was this:
I have, in my init.vim
let g:neomake_cpp_enable_markers=['clang']
let g:neomake_cpp_clang_args = ["-std=c++14", "-Wextra", "-Wall", "-fsanitize=undefined","-g"]
That's all I need to have C++14 with clang and neovim with neomake. I also have au! BufWritePost * Neomake in my init.vim so that it automatically runs whenever I write the file. Fairly sweet setup so far.
@dolohow - @thang1thang2's answer is the right way to do things. Let me know if that doesn't resolve your issue.
Works like charm :)
Note for anyone who finds this solution: my clang++ on osx didn't like the -fsanitize=undefined option, worked fine when I took that flag out.
Thanks @thang1thang2! That did it. For others looking at this - notice how it's enabled_makers and not _enable_markers_. At first I didn't notice and was wondering what was wrong. Correct:
let g:neomake_cpp_enabled_makers=['clang']
let g:neomake_cpp_clang_args = ["-std=c++14"]
Most helpful comment
I spent a few hours figuring this out for myself. How I did it was this:
I have, in my init.vim
That's all I need to have C++14 with clang and neovim with neomake. I also have
au! BufWritePost * Neomakein my init.vim so that it automatically runs whenever I write the file. Fairly sweet setup so far.