[omniORB] IDL #includes -> C++ #includes

baileyk@schneider.com baileyk@schneider.com
Wed Aug 7 17:16:01 2002


I'm getting tripped up by the two possible mappings of IDL #include
dependencies to C++ #include dependencies.  Say I have
a/a.idl
b/b.idl
c/c.idl

in b.idl there's #include <a/a.idl> and in c.idl there's #include
<b/b.idl>.  I can compile c.idl with omniidl -bcxx -I.. c.idl.  Within the
c.hh file is

#ifndef __a_hh_EXTERNAL_GUARD__
#define __a_hh_EXTERNAL_GUARD__
#include <a.hh>
#endif
#ifndef __b_hh_EXTERNAL_GUARD__
#define __b_hh_EXTERNAL_GUARD__
#include <b.hh>
#endif

So it's generated C++ includes for the direct _and_ indirect dependencies.
And it's lost the relative paths.

If I compile with -Wbkeep_inc_path I get too much path information.  The
above becomes

#ifndef __a_hh_EXTERNAL_GUARD__
#define __a_hh_EXTERNAL_GUARD__
#include <../a/a.hh>
#endif
#ifndef __b_hh_EXTERNAL_GUARD__
#define __b_hh_EXTERNAL_GUARD__
#include <../b/b.hh>
#endif

I'd like code which includes c.hh to use <c/c.hh> and for it to work.  Why
include indirect dependencies?  Can anyone help direct me to the part of
the compiler making these path decisions?  I'd like an option to map
<a/a.idl> to <a/a.hh> and <b/b.idl> to <b/b.hh>.

Thanks,
Kendall