View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012227CMakeCMakepublic2011-05-26 09:192013-10-07 10:03
ReporterAlexUA 
Assigned ToStephen Kelly 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformAllOSallOS Version
Product Version 
Target VersionFixed in VersionCMake 2.8.11 
Summary0012227: Transitive dependencies and target properties
DescriptionCMake have transitive dependecies of libraries linked to target. For example if A is static library wich depends from SomeLib. And target B is executable wich depends from A(will link both with A and SomeLib due to transitive dependency).
But the issue is that if we have some specific link_libraries() settings for A the target B won't link.
I've tryed to fix this manually through usage of additional target property like
TgLinkDirectories this property is set in target A and the used in all dependent targets.
But this solution will work only in some traverse orders (A->B which might be not the same in huge and complicated projects).

Actually I need the same functionality for include_directories().
This will help me achive of the functionality like in bjam.
Thanks in advance
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0026617)
AlexUA (reporter)
2011-05-26 09:28

Please take into account that everything works fine for -l libs they transited correctly no matter for traverse order. According to manual they are defined in LINK_INTERFACE_LIBRARIES property and LINK_INTERFACE_LIBRARIES_<config> but in my case all this variables are empty.

It would be great if all target properties could be used with no matter of traverse order.
(0026653)
Brad King (manager)
2011-06-02 11:44

The LINK_INTERFACE_LIBRARIES property is something that you *set* to tell CMake not to transitively depend on every library linked to the target on which you set the property.

Note also that full target dependency analysis is not performed until after the configuration step has finished. It happens only during the generation step so the information is not available to the CMake langauge code in CMakeLists.txt files during configuration.
(0026654)
Brad King (manager)
2011-06-02 11:46

Here is a relevant thread from the mailing list:

  http://www.cmake.org/pipermail/cmake/2009-November/033196.html [^]
(0026655)
Brad King (manager)
2011-06-02 11:49

Currently we have no automatic usage requirement propagation except for linking. Other information about a given package XYZ gets passed by convention in variables called XYZ_INCLUDE_DIRS, XYZ_DEFINITIONS, etc. inside the CMake code of a project, or in package configuration files to cross project boundaries:

  http://www.cmake.org/Wiki/CMake/Tutorials#CMake_Packages [^]
(0032604)
Stephen Kelly (developer)
2013-03-13 11:51

CMake 2.8.11 has transitive handling of the include directories via the INTERFACE_INCLUDE_DIRECTORIES property, and compile_definitions via the INTERFACE_COMPILE_DEFINITIONS property.
(0033997)
Robert Maynard (manager)
2013-10-07 10:03

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2011-05-26 09:19 AlexUA New Issue
2011-05-26 09:28 AlexUA Note Added: 0026617
2011-06-02 11:42 Brad King Status new => backlog
2011-06-02 11:44 Brad King Note Added: 0026653
2011-06-02 11:46 Brad King Note Added: 0026654
2011-06-02 11:49 Brad King Note Added: 0026655
2012-08-27 07:10 Stephen Kelly Assigned To => Stephen Kelly
2012-08-27 07:10 Stephen Kelly Status backlog => assigned
2013-03-13 11:51 Stephen Kelly Note Added: 0032604
2013-03-13 11:51 Stephen Kelly Status assigned => resolved
2013-03-13 11:51 Stephen Kelly Fixed in Version => CMake 2.8.11
2013-03-13 11:51 Stephen Kelly Resolution open => fixed
2013-10-07 10:03 Robert Maynard Note Added: 0033997
2013-10-07 10:03 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team