My example is fairly vanilla, although I'm not sure if there's a way to
cleanly package it so I'll just show the forensics.
An excerpt from my .emacs:
(semantic-add-system-include "c:/usr/local/cell/target/spu/include"
'c++-mode)
(semantic-add-system-include
"c:/usr/local/cell/target/spu/include/cell/spurs" 'c++-mode)
(semantic-add-system-include "c:/usr/local/cell/target/spu/include"
'c-mode)
(semantic-add-system-include
"c:/usr/local/cell/target/spu/include/cell/spurs" 'c-mode)
;; CEDET / EDE / Foo
(add-to-list 'auto-mode-alist (cons "d:/foo" 'c++-mode))
(ede-cpp-root-project "foo"
:name "foo"
:file "d:/foo/main/Jamfile"
:include-path (split-string
(shell-command-to-string "dir /b /s /ad
\"d:\\foo\\main\\install\\ps3-gcc-dbg\"") "\n" t)
)
I then open a file, let's say foo.cpp, under d:\foo that contains an
include in the first system-include dir above (spurs.h). From foo.cpp I
can successfully visit the header (ie, it is parsed). However from that
header I cannot visit anything *it* includes from that hierarchy. If I
do a summarize I see:
Include Summary for File:
c:/usr/local/cell/target/common/include/cell/spurs.h
This file contains 29 tags, 28 of which are includes.
Unknown Includes: 28
Unparsed Includes: 0
Parsed Includes: 0
Include Path Summary:
This file's system include path is:
/usr/include
There are currently no includes found recursively.
If I then switch that buffer (spurs.h) to c++-mode it automatically
switches/re-parses/whatever everything correctly and now when I do a
summarize I see what I expect:
Include Summary for File:
c:/usr/local/cell/target/common/include/cell/spurs.h
External Database References to this buffer:
jobqueue.cpp
jobqueue_ps3.h
This file contains 29 tags, 28 of which are includes.
Unknown Includes: 0
Unparsed Includes: 0
Parsed Includes: 28
Include Path Summary:
This file's system include path is:
[...]
c:/usr/local/cell/target/spu/include/
c:/usr/local/cell/target/spu/include/cell/spurs/
[...]
I'll think about building a little test version of this when I have some
time later this week, but if you have any clever diagnostics for me to
try just let me know.
Thanks,
m.
-----Original Message-----
From: Eric M. Ludlam [mailto:eric@...]
Sent: Sunday, December 13, 2009 8:53 PM
To: Vance, Michael
Cc: cedet-semantic@...
Subject: Re: [cedet-semantic] system include paths
Hi Michael,
Thanks for following up on your question. I'm not familiar with the
problem you related. If you have calls to semantic-add-system-include
for c-mode similar to those for c++ mode, then things should work ok.
There is some trickyness in how major modes inherit from each other that
makes c-mode and c++-mode potentially confusing. Usually when c-mode
features appear in c++-mode, or not. It may also be that when searching
for includes, it didn't want to pick up C files for use with C++. That
is supposed to work, so if you have an example, that would be
interesting to see.
Eric
Vance, Michael wrote:
> Hm, managed to resolve this by appending my project dirs onto the
> auto-mode-alist with c++-mode so that headers would open in c++-mode
> rather than c-mode; not sure why adding the system includes for c-mode
> also didn't have the same effect, I'd assume they would.
>
>
>
> Thanks,
>
>
>
> m.
>
>
>
> *From:* Vance, Michael
> *Sent:* Friday, December 11, 2009 2:48 PM
> *To:* 'cedet-semantic@...'
> *Subject:* system include paths
>
>
>
> Hi all,
>
>
>
> I have a quick question regarding system include paths. I have an
> ~/.emacs file with a variety of lines of the form:
>
>
>
> ;; CEDET / Semantic / Xbox 360 system includes
>
> (semantic-add-system-include "c:/Program Files (x86)/Microsoft Xbox
360
> SDK/include/xbox" 'c++-mode)
>
>
>
> If I open a file outside a project root, it will find headers in the
> system include dirs just fine. However if I open up a file inside an
> ede-cpp-root-project, I'll get tons of unparsed includes. When I look
at
> their summary page I'll see something like below. Is the
> ede-cpp-root-project somehow masking the Semantic system include? Do I
> need to somehow pass my Semantic system include list to the
> ede-cpp-project-root as :system-include or some such? I tried doing
this
> with semantic-dependency-system-include-path but it didn't seem to
work
> properly. I've also tried duplicating all my
semantic-add-system-include
> calls for c-mode as well as c++-mode but that didn't seem to work
either.
>
>
>
> Thanks,
>
>
>
> m.
>
>
>
> Include Summary for File: d:/jobqueue/xenon/jobqueue_xenon.h
>
>
>
> This file contains 17 tags, 3 of which are includes.
>
> Unknown Includes: 2
>
> Unparsed Includes: 0
>
> Parsed Includes: 1
>
>
>
> Include Path Summary:
>
>
>
> This file's project include search is handled by the EDE object:
>
> Buffer Target: #<ede-cpp-root-target d:/jobqueue/xenon/>
>
> Buffer Project: #<ede-cpp-root-project jobqueue>
>
> Backup in-project Locator: #<ede-locate-base Loc>
>
> EDE Project system include path: Empty
>
>
>
> This file's system include path is:
>
> /usr/include
>
>
>
> All unknown includes:
>
> xmmintrin.h
>
> types.h
>
> stdint.h
>
> time.h
>
> stdlib.h
>
> spu_printf.h
>
> spu_intrinsics.h
>
> spu_mfcio.h
>
> sys/time_util.h
>
> ppu_intrinsics.h
>
> ppcintrinsics.h
>
> xtl.h
>
> windows.h
>
>
>
> There are currently no includes found recursively.
>
>
>
> [back]
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>
>
>
------------------------------------------------------------------------
>
>
------------------------------------------------------------------------
------
> Return on Information:
> Google Enterprise Search pays you back
> Get the facts.
> http://p.sf.net/sfu/google-dev2dev
>
>
>
------------------------------------------------------------------------
>
> _______________________________________________
> cedet-semantic mailing list
> cedet-semantic@...
> https://lists.sourceforge.net/lists/listinfo/cedet-semantic
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
|