View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013397CMakeCMakepublic2012-07-12 17:052013-06-04 08:33
Reportercarsten schiemann 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformApple MacOSOS XOS Version10.4.10
Product VersionCMake 2.8.8 
Target VersionCMake 2.8.11Fixed in VersionCMake 2.8.11 
Summary0013397: frameworks are not transitive like libraries in the project dependency graph
Descriptionwhile normal target_link_libraries setups with static libraries forward the dependency to targets adding the static library, this is broken for frameworks. the library dependency is kept but the related Framework Search Path is forgotten.

there was no problem as long as the static library was the only one adding a framework. adding a framework in "/System/Library/Frameworks" to the the final application seems ok too (i did add cocoa). adding a framework in a custom location (like /Library/Frameworks) breaks the forwarding.
Steps To Reproducea rough description of my setup:
static library A
find_library(LIBONE libOne /some)
target_link_libraries(A ${LIBONE}) #/some/libOne.framework

application B
target_link_libraries(B A)
find_library(LIBTWO libTwo /somemore)
target_link_libraries(B LIBTWO) #/somemore/libTwo.framework

generating the Xcode project file shows the Framework Search Path to "/somemore" but it forgot "/some"
Additional Informationi added a patch which seems to fix the issue. but as my understanding of this code is slim at best i might have missed something.
TagsNo tags attached.
Attached Filespatch file icon AnalyseLibDependencies-Framework-forward.patch [^] (462 bytes) 2012-07-12 17:05 [Show Content]

 Relationships
related to 0014191closedBrad King Regression.. framework paths are not added to compile args in XCode generator 

  Notes
(0030053)
Brad King (manager)
2012-07-16 09:21

cmTarget::AnalyzeLibDependencies has been replaced by cmComputeLinkDepends. I wasn't aware it the old implementation was still used for anything except the outdated export_library_dependencies command. It looks like the list of Frameworks is still used for Xcode.

The generation of FRAMEWORK_SEARCH_PATHS in the Xcode generator needs to be converted to use the results of cmComputeLinkDepends/cmComputeLinkInformation instead.
(0031852)
Brad King (manager)
2012-12-07 14:05

It turns out we were already computing the correct value but it was not getting used because the old incorrect computation was never removed. Fixed:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a4448071 [^]
(0031855)
Brad King (manager)
2012-12-07 15:50

Upon further analysis I realized the situation was a bit more subtle than I thought in 0013397:0031852. Here is a better explanation and fix:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2bc22bda [^]
(0032984)
Robert Maynard (manager)
2013-05-06 09:32

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

 Issue History
Date Modified Username Field Change
2012-07-12 17:05 carsten schiemann New Issue
2012-07-12 17:05 carsten schiemann File Added: AnalyseLibDependencies-Framework-forward.patch
2012-07-16 09:21 Brad King Note Added: 0030053
2012-07-16 09:21 Brad King Status new => backlog
2012-12-07 13:37 Brad King Assigned To => Brad King
2012-12-07 13:37 Brad King Status backlog => assigned
2012-12-07 13:37 Brad King Target Version => CMake 2.8.11
2012-12-07 14:05 Brad King Note Added: 0031852
2012-12-07 14:05 Brad King Status assigned => resolved
2012-12-07 14:05 Brad King Resolution open => fixed
2012-12-07 14:05 Brad King Fixed in Version => CMake 2.8.11
2012-12-07 15:50 Brad King Note Added: 0031855
2013-05-06 09:32 Robert Maynard Note Added: 0032984
2013-05-06 09:32 Robert Maynard Status resolved => closed
2013-06-04 08:33 Brad King Relationship added related to 0014191


Copyright © 2000 - 2018 MantisBT Team