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'), |
Alexandre Rames | 89dabc8 | 2016-07-01 14:00:22 +0100 | [diff] [blame] | 17 | '-I', AbsolutePath('test'), |
armvixl | db64434 | 2015-07-21 11:37:10 +0100 | [diff] [blame] | 18 | '-DVIXL_DEBUG' |
armvixl | c68cb64 | 2014-09-25 18:49:30 +0100 | [diff] [blame] | 19 | '-Wall', |
| 20 | '-Werror', |
| 21 | '-Wextra', |
| 22 | '-pedantic', |
armvixl | 330dc71 | 2014-11-25 10:38:32 +0000 | [diff] [blame] | 23 | '-Wno-newline-eof', |
armvixl | c68cb64 | 2014-09-25 18:49:30 +0100 | [diff] [blame] | 24 | '-Wwrite-strings', |
armvixl | db64434 | 2015-07-21 11:37:10 +0100 | [diff] [blame] | 25 | '-std=c++11', |
armvixl | c68cb64 | 2014-09-25 18:49:30 +0100 | [diff] [blame] | 26 | '-x', 'c++' |
| 27 | ] |
| 28 | |
| 29 | if platform.machine() != 'aarch64': |
Pierre Langlois | 1e85b7f | 2016-08-05 14:20:36 +0100 | [diff] [blame] | 30 | flags.append('-DVIXL_INCLUDE_SIMULATOR_AARCH64') |
armvixl | c68cb64 | 2014-09-25 18:49:30 +0100 | [diff] [blame] | 31 | |
| 32 | |
| 33 | def FlagsForFile(filename, **kwargs): |
| 34 | return { |
| 35 | 'flags': flags, |
| 36 | 'do_cache': True |
| 37 | } |
| 38 | |