[cmake-developers] Should CMAKE_LINK_DEPENDS_NO_SHARED be on by default?

Brad King brad.king at kitware.com
Mon Feb 25 14:00:36 EST 2013


On 02/25/2013 01:29 PM, Matthew Woehlke wrote:
> On 2013-02-24 10:29, Stephen Kelly wrote:
>> CMAKE_LINK_DEPENDS_NO_SHARED was introduced in this cycle, but off by
>> default. It seems useful enough to be on by default. Is there any reason not
>> to enable it by default?
> 
> What is the use case for this?
> 
> I'm having a hard time imagining a case where it buys you anything. What 
> would cause a .so to change often that you would *not* want to re-link?

The case here is that when a .so re-links its *dependents* do not
need to be re-linked too.  Since the .so is not statically linked
into the dependents they should not need to be linked again.  The
dynamic loader will simply see the updated .so at runtime.  Refer
back to the thread I linked earlier:

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/43246/focus=44469

-Brad



More information about the cmake-developers mailing list