Re: [CEDET-devel] How to say to EDE to use c++ header file?
Brought to you by:
zappo
|
From: Eric M. L. <er...@si...> - 2009-07-09 01:36:29
|
On Wed, 2009-07-08 at 17:14 +0400, Denis Sukhonin wrote:
> Hi, All!
>
> I have pch.hxx where i put all useful #include-s, for example <vector>.
> It includes by adding -ipch.hxx option for gcc, not by #include.
>
> When i try autocomplete std::vect in somewhere in a cxx file i get this:
> Cannot find types for `"std"'
> But it works when i explicitly include <vector> in the cxx file.
>
> Is there any way to say to EDE to use that header?
>
> I attach a tarball with an example, look a file src/main.cxx.
Hi,
I am not familiar with this gcc option, and as such have never thought
to try to add such a feature.
Here is a patch which I have not tested:
Index: semanticdb-find.el
===================================================================
RCS file: /cvsroot/cedet/cedet/semantic/semanticdb-find.el,v
retrieving revision 1.77
diff -b -u -r1.77 semanticdb-find.el
--- semanticdb-find.el 16 May 2009 11:45:58 -0000 1.77
+++ semanticdb-find.el 9 Jul 2009 01:31:52 -0000
@@ -421,6 +421,9 @@
and TAG is a clone of the include tag that was found.")
(make-variable-buffer-local 'semanticdb-find-scanned-include-tags)
+(defvar semanticdb-implied-include-tags nil
+ "Include tags implied for all files of a given mode.")
+
(defun semanticdb-find-translate-path-includes--internal (path)
"Internal implementation of
`semanticdb-find-translate-path-includes-default'.
This routine does not depend on the cache, but will always derive
@@ -435,7 +438,9 @@
nexttable)
(cond ((null path)
(semantic-refresh-tags-safe)
- (setq includetags (semantic-find-tags-included (current-buffer))
+ (setq includetags (append
+ (semantic-find-tags-included (current-buffer))
+ semanticdb-implied-include-tags)
curtable semanticdb-current-table
incfname (buffer-file-name))
)
----------
You could then write something like:
(defvar-mode-local c++-mode semanticdb-implied-include-tags
(list (semantic-tag-include "ipch.hxx")))
to make your case work.
If this concept works, for your case, I'll see what sorts of things I
can do in EDE for this situation.
Eric
|