-
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy path.ycm_extra_conf.py
More file actions
33 lines (28 loc) · 700 Bytes
/
Copy path.ycm_extra_conf.py
File metadata and controls
33 lines (28 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import os
def FlagsForFile(filename, **kwargs):
flags = [
'-Wall',
'-Wextra',
'-pedantic',
'-D', 'USE_LLVM',
'-D', 'USE_LINENOISE',
'-isystem', '/opt/local/include',
'-isystem', '/opt/local/libexec/llvm-3.6/include/c++/v1',
'-isystem', '/opt/local/libexec/llvm-3.6/lib/clang/3.6.0/include',
'-isystem', '/usr/include'
]
ext = os.path.splitext( filename )[1]
if ext == '.c':
flags += ['-xc']
elif ext == '.cpp':
flags += ['-xc++']
flags += ['-std=c++11']
flags += ['-isystem', '/opt/local/libexec/llvm-3.6/include']
elif ext == '.h':
flags += []
else:
flags = []
return {
'flags': flags,
'do_cache': True
}