armvixl | c68cb64 | 2014-09-25 18:49:30 +0100 | [diff] [blame] | 1 | # Vim YouCompleteMe completion configuration. |
| 2 | # |
| 3 | # See doc/topics/ycm.md for details. |
| 4 | |
| 5 | import os |
| 6 | import platform |
| 7 | |
| 8 | repo_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. |
| 12 | def AbsolutePath(path): |
| 13 | return os.path.join(repo_root, path) |
| 14 | |
| 15 | flags = [ |
| 16 | '-I', AbsolutePath('src'), |
armvixl | db64434 | 2015-07-21 11:37:10 +0100 | [diff] [blame] | 17 | '-DVIXL_DEBUG' |
armvixl | c68cb64 | 2014-09-25 18:49:30 +0100 | [diff] [blame] | 18 | '-Wall', |
| 19 | '-Werror', |
| 20 | '-Wextra', |
| 21 | '-pedantic', |
armvixl | 330dc71 | 2014-11-25 10:38:32 +0000 | [diff] [blame] | 22 | '-Wno-newline-eof', |
armvixl | c68cb64 | 2014-09-25 18:49:30 +0100 | [diff] [blame] | 23 | '-Wwrite-strings', |
armvixl | db64434 | 2015-07-21 11:37:10 +0100 | [diff] [blame] | 24 | '-std=c++11', |
armvixl | c68cb64 | 2014-09-25 18:49:30 +0100 | [diff] [blame] | 25 | '-x', 'c++' |
| 26 | ] |
| 27 | |
| 28 | if platform.machine() != 'aarch64': |
| 29 | flags.append('-DUSE_SIMULATOR') |
| 30 | |
| 31 | |
| 32 | def FlagsForFile(filename, **kwargs): |
| 33 | return { |
| 34 | 'flags': flags, |
| 35 | 'do_cache': True |
| 36 | } |
| 37 | |