Selaa lähdekoodia

Export: Skip INTERFACE libraries when generating -config files.

The properties object has just been created, so is always empty,
which means the if block is never entered. The following lines do
not have any effect because an INTERFACE library has no LOCATION.
At the end, no code is generated for INTERFACE libraries in
config-specific exported files, so skip them early.
Stephen Kelly 12 vuotta sitten
vanhempi
sitoutus
b51b6e97a2
1 muutettua tiedostoa jossa 5 lisäystä ja 7 poistoa
  1. 5 7
      Source/cmExportInstallFileGenerator.cxx

+ 5 - 7
Source/cmExportInstallFileGenerator.cxx

@@ -297,16 +297,14 @@ cmExportInstallFileGenerator
     {
     // Collect import properties for this target.
     cmTargetExport const* te = *tei;
-    ImportPropertyMap properties;
-    std::set<std::string> importedLocations;
-    if (!properties.empty()
-        && te->Target->GetType() == cmTarget::INTERFACE_LIBRARY)
+    if (te->Target->GetType() == cmTarget::INTERFACE_LIBRARY)
       {
-      this->GenerateImportPropertyCode(os, config, te->Target, properties);
-      this->GenerateImportedFileChecksCode(os, te->Target, properties,
-                                           importedLocations);
       continue;
       }
+
+    ImportPropertyMap properties;
+    std::set<std::string> importedLocations;
+
     this->SetImportLocationProperty(config, suffix, te->ArchiveGenerator,
                                     properties, importedLocations);
     this->SetImportLocationProperty(config, suffix, te->LibraryGenerator,