orocos-toolchain / orogen

Code generator for components and type handling in Rock - the Robot Construction Kit - and the Orocos Toolchain
http://rock-robotics.org
Other
4 stars 35 forks source link

fix include path used during IDL generation in some recursive cases #122

Closed doudou closed 5 years ago

doudou commented 5 years ago

Build tests added by:

We generate one IDL file per typekit, which means that include paths should be transitive. The current code was using #used_typekits, which only computes the typekits that the types exported by the typekit need.

Let's assume typekit X defines type BaseUsingStruct and StdUsingStruct. BaseUsingStruct reuses a type already defined by typekit base. StdUsingStruct reuses a type already defined by typekit std.

Now, we have typekit Y which defines EndStruct. EndStruct reuses StdUsingStruct, but nothing in Y uses something from base. This was causing the CMake code to only add the include paths for std and not base, and generation failed.

This commit fixes it by essentially adding the -I options recursively.

doudou commented 5 years ago

@2maz will you have time to review this one too ?