• Brad King's avatar
    Do not export INTERFACE_LINK_LIBRARIES from non-linkable targets · 23d21b78
    Brad King authored
    When cmExportFileGenerator::SetImportLinkInterface exports the old
    LINK_INTERFACE_LIBRARIES property values it skips doing so for
    non-linkable targets because target->GetLinkInterface returns NULL for
    such targets.
    
    Since cmExportFileGenerator::PopulateInterfaceLinkLibrariesProperty
    looks at the INTERFACE_LINK_LIBRARIES property directly instead of using
    the computed link interface, teach it to skip exporting the property if
    target->IsLinkable returns false.
    
    Extend the RunCMake.CMP0022 test with a case covering this.  Simply
    export an executable target that links to a library that is not
    exported.
    23d21b78
CMP0022-export-exe.cmake 250 Bytes