MantisBT - CMake
View Issue Details
0013032CMakeCMakepublic2012-03-09 05:242016-06-10 14:31
Zahary Karadjov 
Kitware Robot 
normaltweakalways
closedmoved 
Visual Studio
 
 
0013032: Support the option "Use Library Dependency Inputs" in Visual Studio 2005+
The build times of Visual Studio CMake generated projects could be significantly improved if
1) All dependent static libraries of an executable are listed as dependencies in Visual Studio
2) The "Linker->General->Use Library Dependency Inputs" option is enabled.

Reference Information:

http://msdn.microsoft.com/en-us/library/024awkd1(v=vs.80).aspx [^]
Use Library Dependency Inputs
In a large project, when a dependent project produces a .lib file, incremental linking is disabled. If there are many dependent projects that produce .lib files, building the application can take a long time. When this property is set to Yes, the project system links in the .obj files for .libs produced by dependent projects, thus enabling incremental linking.

http://blogs.msdn.com/b/vcblog/archive/2010/05/03/flexible-project-to-project-references.aspx [^]

http://code.google.com/p/chromium/wiki/WindowsIncrementalLinking [^]

http://www.xoreax.com/webhelp/pages/advanced_incredilink.htm [^]
No tags attached.
related to 0009732closed Brad King Cmake does not disable Link Libray Dependencies in the project settings 
Issue History
2012-03-09 05:24Zahary KaradjovNew Issue
2012-03-09 08:48Brad KingRelationship addedrelated to 0009732
2012-03-09 08:53Brad KingNote Added: 0028876
2012-03-09 08:56Brad KingNote Added: 0028877
2012-03-10 05:55Zahary KaradjovNote Added: 0028888
2012-03-12 08:58Zahary KaradjovNote Edited: 0028888bug_revision_view_page.php?bugnote_id=28888#r571
2012-03-12 09:02Brad KingStatusnew => backlog
2016-01-29 20:08Vivien MilletNote Added: 0040379
2016-06-10 14:28Kitware RobotNote Added: 0042001
2016-06-10 14:28Kitware RobotStatusbacklog => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0028876)
Brad King   
2012-03-09 08:53   
Background:

The CVS commit mentioned in 0009732:0018129 in Git is:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bc43b0f2 [^]

and since then:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1a0c166a [^]
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fd614e60 [^]

Also see the comment here:

  http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmGlobalVisualStudioGenerator.cxx;hb=v2.8.7#l317 [^]
(0028877)
Brad King   
2012-03-09 08:56   
In short LinkLibraryDependencies messes with the difference between order-only dependencies and true link dependencies.
(0028888)
Zahary Karadjov   
2012-03-10 05:55   
(edited on: 2012-03-12 08:58)
If I understand correctly, you are saying that LinkLibrariesDependencies can't be enabled on a VS project-wide level, because then order-only dependencies added by add_dependency will be linked too.

Please, see the second link I posted:
http://blogs.msdn.com/b/vcblog/archive/2010/05/03/flexible-project-to-project-references.aspx [^]

It explains that now in VS10, the project file can specify LinkLibrariesDependencies on a per-dependency basis.

The build time improvements of UseLibraryDependencyInputs could be quite substantial from my experiences, so this issue is really worth investigating further.

(0040379)
Vivien Millet   
2016-01-29 20:08   
I think this issue should be updated because having options UseLibraryDependencyInputs and LinkLibraryDependencies in MSVC are not only useful for link dependencies but also allows to keep some static variable symbol alive when linking static libraries (which would be thrown away if these flags were not set). It's the case in my project, i absolutely need these flags to be true and i will be forced to change the cmake source myself if not done by the cmake team.
I don't understand why these flags becomes true only on external dependencies in cmake and stay absolutely false in any other case ? And more importantly, why not let the freedom to the user to decide if these flags are set or not, even if it creates some conflicts (a warning can be emitted in this case)
(0042001)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.