View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011058CMakeCMakepublic2010-07-29 02:182011-01-12 07:35
ReporterKovarththanan Rajaratnam 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionCMake 2.8.4Fixed in VersionCMake 2.8.4 
Summary0011058: TARGET_LINK_LIBRARIES only works in the directory defining the library
DescriptionIt looks like TARGET_LINK_LIBRARIES(target1 depend1..dependn) only works _if_ TARGET_LINK_LIBRARIES() is invoked in the same directory that defines target1.

The documentation doesn't mention anything about this, so I don't know whether this is a bug?
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0024176)
Brad King (manager)
2010-12-15 12:25

The behavior is intentional. The local scope needs to know that link information will not magically appear elsewhere. This is so that things like the export() command can write link dependency information immediately.

I updated the documentation and the error message to be more specific:

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

 Issue History
Date Modified Username Field Change
2010-07-29 02:18 Kovarththanan Rajaratnam New Issue
2010-12-15 11:14 David Cole Assigned To => Brad King
2010-12-15 11:14 David Cole Status new => assigned
2010-12-15 12:25 Brad King Note Added: 0024176
2010-12-15 12:25 Brad King Status assigned => closed
2010-12-15 12:25 Brad King Resolution open => fixed
2011-01-12 07:35 David Cole Fixed in Version => CMake 2.8.4
2011-01-12 07:35 David Cole Target Version => CMake 2.8.4


Copyright © 2000 - 2018 MantisBT Team