[CMake] Build Library from Thrift generated files

Pascal Bach pasci.bach at gmail.com
Thu Sep 5 09:21:43 EDT 2013


>>
>
> >> Unknown source file name is just painful.
> >>
> >> Can't the thrift generator tell you the name of the files he will generate?
> >> Something like:
> >> thrift --generated-file-list Service.thrift
> >>
>
> How wouldn't the output depend on the content of the input :-]... just kidding.
>
> The "not predictable output"  is is a biased point of view :-)
>
> Even if thrift needs to generate several classes, functions whatever
> nothing prevent the tool of putting that in 2 (possibly) big files, like:
>
> Services.thrift
> -->
> Services.hh
> Services.cpp
>
> I do use a (home made) source generator which does just that.
> Generating 1 file per class is a convention not an obligation.
> At least in C, C++ and Python.

I discussed you proposal with one of the thrift maintainers. He will
discuss the idea of a generated-list option and maybe it will be
added.

In the meantime I will go with the files pre generated and I treat
them as all the other source files. This means the developer has to
trigger the regeneration process manually. For the moment this is
acceptable for me.

Thanks for your help.

Regards
Pascal


More information about the CMake mailing list