Skip to content
  • Brad King's avatar
    install(EXPORT): Fix crash on target in another directory · 47460f3e
    Brad King authored
    
    
    Refactoring merged by commit v3.5.0-rc1~299 (Merge topic
    'use-generator-target', 2015-10-20) in and around
    commit v3.5.0-rc1~299^2~13 (cmExportSet: Store a cmGeneratorTarget,
    2015-10-17) changed export sets to delay looking up actual targets and
    stores only their names.  However, in InstallCommand::HandleExportMode
    we need to lookup targets immediately to check them for
    EXPORT_LINK_INTERFACE_LIBRARIES.  The check was accidentally made local
    to the current directory, so if an export set contains a target from
    another directory the lookup fails and CMake crashes.  Fix the check to
    look up the target name globally, and tolerate when no target is found
    just in case.
    
    Reported-by: default avatarKelly Thompson <kgt@lanl.gov>
    47460f3e