瀏覽代碼

ENH: fix for bug -gdwarf getting removed

Bill Hoffman 19 年之前
父節點
當前提交
107e01c8dc
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      Source/cmGlobalXCodeGenerator.cxx

+ 4 - 0
Source/cmGlobalXCodeGenerator.cxx

@@ -866,6 +866,10 @@ std::string cmGlobalXCodeGenerator::ExtractFlag(const char* flag,
   std::string::size_type pos = flags.find(flag);
   if(pos != flags.npos)
     {
+    if(flags[pos + strlen(flag)] != ' ')
+      {
+      return flags;
+      }
     retFlag = flag;
     // remove the flag
     flags[pos]=' ';