On Fri, Jun 21, 2013 at 3:41 PM, William Woodall
<notifications@github.com>wrote:

> A compromise might be to have that variable always contain a phony target
> which is immediately satisfied (so it doesn't mess with build order), but
> which allows the catkin_EXPORTED_TARGETS variable to always be set to
> something valid.
>
> That way it's one call, and we don't have to wrap standard CMake code.
>
+1

Someone else added it, and I assume they added it because they needed to
add it to compile, but maybe they were just following the documentation.

> I would also note that the catkin_simple prototype addresses this by
> automatically checking the variable and adding the dependencies, but it can
> only do that because it has a list of all of the targets created, because
> it wraps all of the CMake add_* calls. See:
>
>
> https://github.com/wjwwood/catkin_simple/blob/master/cmake/catkin_simple-extras.cmake.em#L90
>
Indeed.

> If CMake kept track of targets in a project we could do something like
> this, but even if we were to get this into CMake we would be talking about
> 2014 at the earliest before we could depend on that version of CMake and to
> do so would break backwards compatibility with older versions of Ubuntu. So
> this is something we can pursue, but not something we can rely on solving
> the problem in the near future.
>
Yeah, but it's something, which if someone was interested in pursuing,
could pay off in the future for other such calls. i feel like there have
been a lot of feature ideas which would require such functionality.

-j




-- 
Jonathan Bohren
Laboratory for Computational Sensing and Robotics
http://dscl.lcsr.jhu.edu/People/JonathanBohren