Sergey Rudchenko wrote:
On Wed, 2009-04-22 at 10:41 -0400, Brad King wrote:
In general the generators should never have to see any imported
targets.
If you have a "cmTarget*" you can always ask its IsImported() method.
Thanks, Brad. Now it's clean for we how things should be implemented.
So there is one straight problem for me: LocalGenerator uses
cmTarget::GetLinkLibraries which is a
std::vector<std::pair<std::string, LinkLibraryType> > >
Don't use GetLinkLibraries. It's the "old-style" link computation results
which had some bugs. If you're computing a set of libraries to specify
for linking in a project file, use cmComputeLinkInformation:
cmComputeLinkInformation* pcli = target.GetLinkInformation(configName);
So, I have no cmTarget* object there (and can't find it, since the
cmMakefile::ImportedTargets is private). I guess there should be a
method like:
cmTarget* cmMakefile::FindImportedTarget(const char* name);
cmTarget* cmMakefile::FindTargetToUse(const char* name)
It looks for an imported target first, and then a standard target.
-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