1#-----------------------------------------------------------------------------
2#
3#  Configuration for YouCompleteMe Vim plugin
4#
5#  http://valloric.github.io/YouCompleteMe/
6#
7#-----------------------------------------------------------------------------
8
9from os.path import realpath, dirname
10
11basedir = dirname(realpath(__file__))
12
13# some default flags
14# for more information install clang-3.2-doc package and
15# check UsersManual.html
16flags = [
17'-Werror',
18'-Wall',
19'-Wextra',
20'-pedantic',
21'-Wno-return-type',
22'-Wno-unused-parameter',
23'-Wno-unused-variable',
24
25'-std=c++11',
26
27# '-x' and 'c++' also required
28# use 'c' for C projects
29'-x',
30'c++',
31
32# workaround for https://github.com/Valloric/YouCompleteMe/issues/303
33# also see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=800618
34'-isystem',
35'/usr/lib/ycmd/clang_includes/',
36
37'-I%s/../protozero/include' % basedir,
38'-I%s/include' % basedir,
39'-I%s/test/include' % basedir,
40'-I%s/test/catch' % basedir,
41]
42
43# youcompleteme is calling this function to get flags
44# You can also set database for flags. Check: JSONCompilationDatabase.html in
45# clang-3.2-doc package
46def FlagsForFile( filename ):
47  return {
48    'flags': flags,
49    'do_cache': True
50  }
51