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 '-I', AbsolutePath('test'), 18 '-DVIXL_DEBUG' 19 '-Wall', 20 '-Werror', 21 '-Wextra', 22 '-pedantic', 23 '-Wno-newline-eof', 24 '-Wwrite-strings', 25 '-std=c++11', 26 '-x', 'c++' 27] 28 29if platform.machine() != 'aarch64': 30 flags.append('-DVIXL_INCLUDE_SIMULATOR_AARCH64') 31 32 33def FlagsForFile(filename, **kwargs): 34 return { 35 'flags': flags, 36 'do_cache': True 37 } 38 39