• Andrey Pokrovskiy's avatar
    cmExportInstallFileGenerator: Fix crash in FindNamespaces · 7dbfdddf
    Andrey Pokrovskiy authored
    Refactoring merged by commit 9afbb733 (Merge topic
    'use-generator-target', 2015-10-20) in and around commit 381e7afd
    (cmExportSet: Store a cmGeneratorTarget, 2015-10-17) forgot to update
    one place in this method.  This leads to a crash in code such as
    
      add_library(A a.c)
      add_library(B b.c)
      target_link_libraries(B A)
      install(TARGETS B DESTINATION lib EXPORT ExpB)
      install(EXPORT ExpB DESTINATION lib/cmake/test)
      add_executable(C c.c)
      install(TARGETS C DESTINATION bin EXPORT ExpC)
    
    Fix the target name reference to avoid using an unpopulated Target
    pointer.
    7dbfdddf
cmExportInstallFileGenerator.cxx 18.6 KB