On 10/31/2013 03:40 PM, Brad King wrote:
>   if(explicitLibraries)
>     {
>     ...
>     }
>   else if (this->GetPolicyStatusCMP0022() == cmPolicies::WARN
>         || this->GetPolicyStatusCMP0022() == cmPolicies::OLD)
>     // The implementation shouldn't be the interface if CMP0022 is NEW. That
>     // way, the LINK_LIBRARIES property can be set directly without having to
>     // empty the INTERFACE_LINK_LIBRARIES
>     {
>     // The link implementation is the default link interface.

Prior to 2.8.12 this was just "else" with no policy test.
This should still be the case.  Then when exporting the old
properties you need this:

   if (iface->ImplementationIsInterface)
     {
-    this->SetImportLinkProperty(suffix, target,
+    if(!newCMP0022Behavior || this->ExportOld)
+      {
+      this->SetImportLinkProperty(suffix, target,
                                 "IMPORTED_LINK_INTERFACE_LIBRARIES",
                                 iface->Libraries, properties, missingTargets);
+      }
     return;
     }

which basically says that the link implementation is used as
the old link interface properties when CMP0022 is not NEW
or we've been explicitly told to export the old properties.

The hard part is in exporting the new link interface property
in cmExportFileGenerator::PopulateInterfaceLinkLibrariesProperty
which is not per-config but the link implementation is per-config.

Ideas?
-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to