Kaynağa Gözat

BUG: When there are no link flags, we want an empty string, not a null pointer.

Brad King 23 yıl önce
ebeveyn
işleme
c8694bb509
1 değiştirilmiş dosya ile 8 ekleme ve 1 silme
  1. 8 1
      Source/cmLocalUnixMakefileGenerator.cxx

+ 8 - 1
Source/cmLocalUnixMakefileGenerator.cxx

@@ -1000,12 +1000,19 @@ void cmLocalUnixMakefileGenerator::OutputStaticLibraryRule(std::ostream& fout,
     {
     {
     targetSuffix = this->GetSafeDefinition("CMAKE_STATIC_LIBRARY_SUFFIX");
     targetSuffix = this->GetSafeDefinition("CMAKE_STATIC_LIBRARY_SUFFIX");
     }
     }
+  std::string linkFlags;
+  const char* targetLinkFlags = t.GetProperty("LINK_FLAGS");
+  if(targetLinkFlags)
+    {
+    linkFlags += targetLinkFlags;
+    linkFlags += " ";
+    }
   this->OutputLibraryRule(fout, name, t,
   this->OutputLibraryRule(fout, name, t,
                           targetPrefix,
                           targetPrefix,
                           targetSuffix,
                           targetSuffix,
                           createRule,
                           createRule,
                           "static library",
                           "static library",
-                          t.GetProperty("LINK_FLAGS"));
+                          linkFlags.c_str());
   
   
 }
 }