[Bug 835] New: orocos macros overwrite flags set by rosbuild_add_library

http://bugs.orocos.org/show_bug.cgi?id=835

Summary: orocos macros overwrite flags set by
rosbuild_add_library
Product: Toolchain
Version: master
Platform: All
OS/Version: All
Status: NEW
Severity: blocker
Priority: P3
Component: RTT
AssignedTo: orocos-dev [..] ...
ReportedBy: ruben [dot] smits [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

Created attachment 658
--> http://bugs.orocos.org/attachment.cgi?id=658
patch

After two full days of debugging (I was getting paranoid on this one) I found a
bug in the orocos cmake macros:

In the case ROS_ROOT is detected the orocos macros use rosbuild_add_library,
this cmake macro installs some compile and link flags (defined in the manifests
of the packages you depend on). The orocos macros however overwrite these flags
afterwards in the set_target_properties call.

The attached patch includes two helper macros (orocos_add_xxx_flags, taken from
rosbuild) that are used by the public orocos macros to append the flags instead
of overwriting them.

-- Ruben

[Bug 835] orocos macros overwrite flags set by rosbuild_add_libr

http://bugs.orocos.org/show_bug.cgi?id=835

Peter Soetens <peter [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED

--- Comment #2 from Peter Soetens <peter [..] ...> 2011-03-14 11:23:30 CET ---
(In reply to comment #1)
> (In reply to comment #0)
> > Created attachment 658 [details]
> > patch
> >
> > After two full days of debugging (I was getting paranoid on this one) I found
> a
> > bug in the orocos cmake macros:
> >
> > In the case ROS_ROOT is detected the orocos macros use rosbuild_add_library,
> > this cmake macro installs some compile and link flags (defined in the
> manifests
> > of the packages you depend on). The orocos macros however overwrite these
> flags
> > afterwards in the set_target_properties call.
> >
> > The attached patch includes two helper macros (orocos_add_xxx_flags, taken
> from
> > rosbuild) that are used by the public orocos macros to append the flags
> instead
> > of overwriting them.
>
> My bad. I thought the target properties were appended, not overwritten, so I did
> see no harm in setting them without checking the current values.
>
> Peter

Final fix is now on toolchain-2.3 and no longer uses the rosbuild macro, but a
renamed copy of it.

Peter

[Bug 835] orocos macros overwrite flags set by rosbuild_add_libr

http://bugs.orocos.org/show_bug.cgi?id=835

Peter Soetens <peter [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |peter [..] ...

--- Comment #1 from Peter Soetens <peter [..] ...> 2011-03-08 11:47:47 CET ---
(In reply to comment #0)
> Created attachment 658 [details]
> patch
>
> After two full days of debugging (I was getting paranoid on this one) I found a
> bug in the orocos cmake macros:
>
> In the case ROS_ROOT is detected the orocos macros use rosbuild_add_library,
> this cmake macro installs some compile and link flags (defined in the manifests
> of the packages you depend on). The orocos macros however overwrite these flags
> afterwards in the set_target_properties call.
>
> The attached patch includes two helper macros (orocos_add_xxx_flags, taken from
> rosbuild) that are used by the public orocos macros to append the flags instead
> of overwriting them.

My bad. I thought the target properties were appended, not overwritten, so I
did see no harm in setting them without checking the current values.

Peter