Sergey Rudchenko wrote:
What piece of code should handle those imported targets? I thought it is
cmMakefile::AddLinkLibraryForTarget, but it doesn't do that. Should a
local generator check itself whether a library is an imported target?
I thought this work is done transparently for generators.

Imported targets are kept in cmMakefile::ImportedTargets which is separate
from regular targets.  The generators do not see them when looping over
lists of targets.  The cmMakefile::AddLinkLibraryForTarget method just
adds the target name to a list of libraries to be linked.  This list gets
transformed by cmComputeLinkDepends and cmComputeLinkInformation into the
final link line, which includes lookup of imported targets.

I use cmLocalVisualStudio6Generator as a reference and looked at the
cmLocalUnixMakefileGenerator3 but still do not understand how to distinguish
imported link libraries from other ones in a LocalGenerator.

In general the generators should never have to see any imported targets.
If you have a "cmTarget*" you can always ask its IsImported() method.

Now I'm working in the CVS source.

Great, thanks.

-Brad
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to