ycm-core / YouCompleteMe

A code-completion engine for Vim

Home Page:http://ycm-core.github.io/YouCompleteMe/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'-I../include' or '-isystem', '../include/', not working for mac os

cxwx opened this issue · comments

commented

Issue Prelude

  • I have read and understood YCM's CONTRIBUTING document.
  • I have read and understood YCM's CODE_OF_CONDUCT document.
  • I have read and understood YCM's README, especially the
    Frequently Asked Questions section.
  • I have searched YCM's issue tracker to find issues similar to the one I'm
    about to report and couldn't find an answer to my problem. (Example Google
    search.
    )
  • If filing a bug report, I have included the output of vim --version.
  • If filing a bug report, I have included the output of :YcmDebugInfo.
  • If filing a bug report, I have attached the contents of the logfiles using
    the :YcmToggleLogs command.
  • If filing a bug report, I have included which OS (including specific OS
    version) I am using.
  • If filing a bug report, I have included a minimal test case that reproduces
    my issue, using vim -Nu /path/to/YCM/vimrc_ycm_minimal, including what I
    expected to happen and what actually happened.
  • If filing a installation failure report, I have included the entire output
    of install.py (or cmake/make/ninja) including its invocation
  • I understand this is an open-source project staffed by volunteers and
    that any help I receive is a selfless, heartfelt gift of their free time. I
    know I am not entitled to anything and will be polite and courteous.
  • I understand my issue may be closed if it becomes obvious I didn't
    actually perform all of these steps.

Thank you for adhering to this process! It ensures your issue is resolved
quickly and that neither your nor our time is needlessly wasted.

Issue Details

I have a cpp project with ./include, ./src in project, and I open the file in ./src and cannot find the head file
in ../include
like https://github.com/WCSim/WCSim project

  • What did you do?

I modify the ycm_extra_conf.py file and add absolate filepath

     '-isystem',
      '/Users/chenxu/software/WCsim/WCSim/include',

It's OK to find the headfile
but
if I change the path to

     '-isystem',
      '../include',
     '-isystem',
      './include',

It doesn't work!

  • What did you expect to happen?

work with relative path like '../include',

The documentation clearly states how to control the relative path when using lib clang.
When using clangd, it is part of the compilation database.

No reproducible test case was provided that suggests either of those don't work.