On 06/11/2014 10:46 AM, Brad King wrote: > However, please look at improving the implementation to have > something under O(n^2) complexity when the usage requirements > do not actually depend on the headTarget.
After looking through the related code I have a few other comments. I see a lot of duplication of evaluating the link impl. Loops over LinkImplementationPropertyEntries appear for each usage requirement type. I think that can be converted to use a method like GetLinkImplementationLibraries if we were to add backtrace information to the cmTarget::LinkImplementation list of libraries. Can the dagChecker used for INTERFACE_SOURCES be moved into GetDirectLinkLibraries or ComputeLinkImplementation? Then the loop over LinkImplementationPropertyEntries for SOURCES could be converted too. Why do GetLinkImplementationLibraries and GetLinkImplementation need a headTarget argument? The LINK_LIBRARIES are private to the implementation of a target itself. Only the link interface should be considered when headTarget != this. I noticed some headTarget->GetMakefile()->FindTargetToUse() calls. This is not a safe way to look up a target name referenced by the currentTarget because imported target names are scoped by directory. See the attached example for some failure cases. Read B/CMakeLists.txt comments. I think those are triggered by the call in processILibs. I'm having trouble producing example breakage for the calls in GetTransitivePropertyTargets, but they look incorrect too. FindTargetToUse always needs to be called on the cmMakefile context of the target whose link info references the name to be found. Thanks, -Brad
bad-imported-target-lookup.tar.gz
Description: application/gzip
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers