diff options
author | Brad King <brad.king@kitware.com> | 2013-11-02 18:49:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-11-02 18:51:07 (GMT) |
commit | 23d21b78e125c11a0d901eb987e5f616026ff8fd (patch) | |
tree | 6b80554df4b0c2f51e8ccfd7fd9a100620a2a400 /Source | |
parent | ef10b87cc1e87343a778c89d8a41d7e11ca08a7c (diff) | |
download | CMake-23d21b78e125c11a0d901eb987e5f616026ff8fd.zip CMake-23d21b78e125c11a0d901eb987e5f616026ff8fd.tar.gz CMake-23d21b78e125c11a0d901eb987e5f616026ff8fd.tar.bz2 |
Do not export INTERFACE_LINK_LIBRARIES from non-linkable targets
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.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmExportFileGenerator.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index a30c5e4..14be5cd 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -185,6 +185,10 @@ bool cmExportFileGenerator::PopulateInterfaceLinkLibrariesProperty( ImportPropertyMap &properties, std::vector<std::string> &missingTargets) { + if(!target->IsLinkable()) + { + return false; + } const char *input = target->GetProperty("INTERFACE_LINK_LIBRARIES"); if (input) { |