[CRIU] [PATCH 3/5] protobuf: Add include/protobuf symlink
Cyrill Gorcunov
gorcunov at openvz.org
Wed Feb 6 01:58:17 EST 2013
On Wed, Feb 06, 2013 at 03:38:46AM +0400, Pavel Emelyanov wrote:
> On 02/06/2013 02:29 AM, Cyrill Gorcunov wrote:
> > On Wed, Feb 06, 2013 at 02:21:51AM +0400, Pavel Emelyanov wrote:
> >> On 02/06/2013 12:04 AM, Cyrill Gorcunov wrote:
> >>>
> >>> This will allow us to lookup for protobuf
> >>> headers by relative
> >>>
> >>> #include "protobuf/some-file.h"
> >>>
> >>> instead of jumping over directory as we do now
> >>>
> >>> #include "../protobuf/some-file.h"
> >>
> >> Why not feed the proper -I option to gcc instead?
> >
> > We can do that, but it makes code less readable I think,
> > because we will have to delete ".." part anyway and add
> > -Icrtools/ as path for lookup which I find _very_ strange.
>
> What's wrong with that? All (_ALL_) sources will have
> #include "protobuf/xxx.h"
Passing -I option for source root means that code is badly organized.
Actually it's not our fault since protoc-c is pretty dump and has
no option to "put headers generated in some other place". But ideally
all headers should live in other directory than source code. It's just
a good taste. And adding a symlink for that I found less evil.
Technically you're right, there is no problem to add -I(srctoot)
for protobuf headers, I just don't like it.
Still if you think -I(srctoot) is better here, ok I'll go this way.
Cyrill
More information about the CRIU
mailing list