Discussion:
[omniORB] [Q] prepending custom includes to generated skeletos
V S P
2009-04-06 10:46:51 UTC
Permalink
Hello,
I am generating skeletons for C++
and my projects are setup such that they all use precompiled headers

Therefore, I have to add #include "stdafx.h" as the first include
file (otherwise all of the includes in the .cc file get ignored).


I searched google for 'append custom include' for omni idl but did not
find anything.

Is this doable?

thank you in advance,
Vlad
--
V S P
***@fastmail.fm
--
http://www.fastmail.fm - Send your email first class
Duncan Grisby
2009-04-10 15:48:18 UTC
Permalink
Post by V S P
I am generating skeletons for C++
and my projects are setup such that they all use precompiled headers
Therefore, I have to add #include "stdafx.h" as the first include
file (otherwise all of the includes in the .cc file get ignored).
I searched google for 'append custom include' for omni idl but did not
find anything.
Is this doable?
It's not something you can do with a command line switch or anything.
However, it's really easy to modify the omniidl back-end to do it. Look
at src/lib/omniORB/omniidl_be/cxx/skel/template.py. At the top of the
file you'll see the template for the start of the skeleton files. You
can add your #include there.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
V S P
2009-04-11 08:57:27 UTC
Permalink
Thank you very much for the pointer.
I wanted to learn how to specialise the idl compiler for my needs
any way , and this is an excellent entry point for me

Vlad
Post by Duncan Grisby
Post by V S P
I am generating skeletons for C++
and my projects are setup such that they all use precompiled headers
Therefore, I have to add #include "stdafx.h" as the first include
file (otherwise all of the includes in the .cc file get ignored).
I searched google for 'append custom include' for omni idl but did not
find anything.
Is this doable?
It's not something you can do with a command line switch or anything.
However, it's really easy to modify the omniidl back-end to do it. Look
at src/lib/omniORB/omniidl_be/cxx/skel/template.py. At the top of the
file you'll see the template for the start of the skeleton files. You
can add your #include there.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- http://www.grisby.org --
--
V S P
***@fastmail.fm
--
http://www.fastmail.fm - Choose from over 50 domains or use your own
Loading...