1# Vim YouCompleteMe completion configuration. 2# 3# See doc/topics/ycm.md for details. 4 5import os 6import platform 7 8repo_root = os.path.dirname(os.path.abspath(__file__)) 9 10# Paths in the compilation flags must be absolute to allow ycm to find them from 11# any working directory. 12def AbsolutePath(path): 13 return os.path.join(repo_root, path) 14 15flags = [ 16 '-I', AbsolutePath('src'), 17 '-Wall', 18 '-Werror', 19 '-Wextra', 20 '-pedantic', 21 '-Wno-newline-eof', 22 '-Wwrite-strings', 23 '-std=c++', 24 '-x', 'c++' 25] 26 27if platform.machine() != 'aarch64': 28 flags.append('-DUSE_SIMULATOR') 29 30 31def FlagsForFile(filename, **kwargs): 32 return { 33 'flags': flags, 34 'do_cache': True 35 } 36 37