[CMake] link_libraries() deprecated. Why?

Marcel Loose loose at astron.nl
Fri Apr 3 03:25:08 EDT 2009


So, what am I to do?
Should I file a bug report for this? If so, what should I put in it,
cause it's not really a bug. 
It would at least be good to know if deprecated features will ever be
removed, or if I need to set one or more policies.

Best regards,
Marcel Loose.

On Thu, 2009-04-02 at 08:27 -0400, Philip Lowman wrote:
> On Thu, Apr 2, 2009 at 4:03 AM, Marcel Loose <loose at astron.nl> wrote:
>         Hi Philip,
>         
>         Thanks for your reply. Your solution is ok, but it looks a bit
>         like a
>         workaround for a feature that is missing, but was once there:
>         link_libraries().
>         
>         To me, it's not really clear why link_libraries() has been
>         deprecated
>         and, for example, include_directories() has not. IMHO, using
>         target_link_libraries() for a general library has a too fine
>         granularity.
>         Suppose include_directories() were deprecated as well in
>         favour of, say,
>         target_include_directories(). That would create the same
>         problem: carry
>         around variables holding a bunch of include directories that
>         must be
>         supplied to each target.
>         
>         I don't like to use deprecated features, so I would love to
>         see the
>         deprecation of link_libraries() to be reverted. But maybe I'm
>         missing a
>         good reason for not doing so.
> 
> I'm not sure why the feature was "deprecated".  I didn't even know
> about it until you posted the question!  I also don't know exactly
> what CMake's stance is on deprecation although I think the official
> policy is not to remove old commands because it would break backwards
> compatibility.  The word "deprecated" can imply that the feature is
> meant to be removed but doesn't necessarily mean so.  The ambiguity
> there really sucks.  Perhaps "obsolete" is a better choice of words.
> 
> 
> -- 
> Philip Lowman



More information about the CMake mailing list