title: How to configure .ycm_extra_conf.py for current project include PATH
body: <p>I installed YCM and syntastic for VIM, normally they work fine, but I have problem when it detect some errors in my code, it shows that can NOT find some head files(which is my project head file).</p>
  
  <p>My directory tree shows below:</p>
  
  <pre><code>TOP
  ├── debug
  │   ├── debug.c
  │   ├── debug.h
  │   ├── debug.mk
  │   └── instrument.c
  ├── driver
  │   ├── driver.c
  │   ├── driver_ddi.c
  │   ├── driver_ddi.h
  │   ├── driver.h
  │   └── driver.mk
  ├── include
  │   └── common.h
  ├── libs
  ├── Makefile
  ├── mw
  │   ├── manager.c
  │   └── mw.mk
  └── root
      ├── main.c
      └── root.mk
  </code></pre>
  
  <p>I copied a <code>.ycm_extra_conf.py</code> to the TOP, meanwhile, I will generated <code>tag</code> and <code>cscope</code> file at TOP as well, therefore each time I open file on TOP, like:</p>
  
  <pre><code>howchen@host:~/Work/c/sample/src
  -&gt; gvim ./driver/driver.c
  </code></pre>
  
  <p>to make sure each time I can add <code>tag</code> and <code>cscope</code> file in VIM. The problem is, if I open <code>driver.c</code>, which contain head files： <code>driver.h</code>, <code>driver_ddi.h</code>, <code>debug.h</code>, <code>common.h</code>, code like below:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include "math.h"
  #include "common.h"
  #include "debug.h"
  #include "driver_ddi.h"
  #include "driver.h"
  </code></pre>
  
  <p>the <code>syntastic</code> or <code>YCM</code> always show it can NOT find <code>common.h</code> and <code>debug.h</code>, other head files are OK.</p>
  
  <p><strong>My YCM and syntastic config part in vimrc file:</strong></p>
  
  <pre><code>" YCM
  "   let g:ycm_extra_conf_globlist = ['~/.vim/bundle/YouCompleteMe/cpp/ycm/*','!~/*']
      let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py'
  
  " Syntastic
      let g:syntastic_c_checkers=['make']
      let g:syntastic_always_populate_loc_list = 1
      let g:syntastic_check_on_open=1
      let g:syntastic_enable_signs=1
      let g:syntastic_error_symbol = '✗'
      let g:syntastic_warning_symbol = '⚠'
      set statusline+=%#warningmsg#
      set statusline+=%{SyntasticStatuslineFlag()}
      set statusline+=%*gbar
  </code></pre>
  
  <p><strong>My <code>.ycm_extra_conf.py</code> write <code>flags</code> variable as:</strong></p>
  
  <pre><code>flags = [
  '-Wall',
  '-Wextra',
  '-Werror',
  '-Wc++98-compat',
  '-Wno-long-long',
  '-Wno-variadic-macros',
  '-fexceptions',
  '-DNDEBUG',
  '-std=c99',
  # ...and the same thing goes for the magic -x option which specifies the
  # language that the files to be compiled are written in. This is mostly
  # relevant for c++ headers.
  # For a C project, you would set this to 'c' instead of 'c++'.
  '-x', #I don't know if I need remove -x
  'c',
  '-isystem',
  '../llvm/include',
  '-isystem',
  '../llvm/tools/clang/include',
  '-I',
  '.',
  '-I',
  '../driver'
  '-I',
  '../debug'
  '-I',
  '../include'
  '-I',
  '../include'
  ]
  </code></pre>
  
  <p>any wrong flags I set?</p>