MantisBT - CMake
View Issue Details
0008655CMakeCMakepublic2009-03-02 22:002014-06-02 08:37
Philip Lowman 
Brad King 
normalfeatureN/A
closedfixed 
CMake-2-6 
CMake 2.8.11 
0008655: Optionally disable relinking targets against shared libraries in the Makefile generator
As discussed recently on the CMake mailing list in the thread "Avoiding a relink". The makefile generator automatically causes all targets that depend on a shared library to relink themselves when it the shared library is relinked. This is a good default behavior but is often annoying at times when a user makes a trivial change to an CPP file (implementation) and would prefer not having "make" relink the entire world.

There are workarounds in the form of just making the affected target with "make foo" or "make foo/fast" and running the desired binaries.

Presumably an implementation for this in the Makefile generator would be to make dependents of shared libraries depend on a stamp file so they only relink when CMake says so. The problem is twofold, when should CMake say so, and what should be the interface for enabling this functionality.
CMake could catch:
* changes to header files (trigger relink)
* adding/removing source files (trigger relink)
CMake could not easily catch:
* A user removing a symbol from a shared library (ideally a relink should be triggered so executables depending on said shared library would get a link error).
* Use of "extern" in CPP files.
No tags attached.
Issue History
2009-03-02 22:00Philip LowmanNew Issue
2009-09-11 17:42Bill HoffmanStatusnew => assigned
2009-09-11 17:42Bill HoffmanAssigned To => Brad King
2012-08-13 10:36Brad KingStatusassigned => backlog
2012-08-13 10:36Brad KingNote Added: 0030476
2013-11-02 11:14Stephen KellyNote Added: 0034329
2013-11-02 11:14Stephen KellyStatusbacklog => resolved
2013-11-02 11:14Stephen KellyFixed in Version => CMake 2.8.11
2013-11-02 11:14Stephen KellyResolutionopen => fixed
2014-06-02 08:37Robert MaynardNote Added: 0035993
2014-06-02 08:37Robert MaynardStatusresolved => closed

Notes
(0030476)
Brad King   
2012-08-13 10:36   
Sending issues I'm not actively working on to the backlog to await someone with time for them.

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it:

 http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer or contributor who has the bandwidth to take it on.
(0034329)
Stephen Kelly   
2013-11-02 11:14   
Can be controlled with CMAKE_LINK_DEPENDS_NO_SHARED.
(0035993)
Robert Maynard   
2014-06-02 08:37   
Closing resolved issues that have not been updated in more than 4 months.