瀏覽代碼

Merge branch 'backport-fix-lang-std-option-list' into fix-lang-std-option-list

Brad King 8 年之前
父節點
當前提交
74e337117f
共有 1 個文件被更改,包括 10 次插入2 次删除
  1. 10 2
      Source/cmLocalGenerator.cxx

+ 10 - 2
Source/cmLocalGenerator.cxx

@@ -1647,7 +1647,11 @@ void cmLocalGenerator::AddCompilerRequirementFlag(
 
     const char* opt =
       target->Target->GetMakefile()->GetRequiredDefinition(option_flag);
-    this->AppendFlagEscape(flags, opt);
+    std::vector<std::string> optVec;
+    cmSystemTools::ExpandListArgument(opt, optVec);
+    for (size_t i = 0; i < optVec.size(); ++i) {
+      this->AppendFlagEscape(flags, optVec[i]);
+    }
     return;
   }
 
@@ -1660,7 +1664,11 @@ void cmLocalGenerator::AddCompilerRequirementFlag(
 
     if (const char* opt =
           target->Target->GetMakefile()->GetDefinition(option_flag)) {
-      this->AppendFlagEscape(flags, opt);
+      std::vector<std::string> optVec;
+      cmSystemTools::ExpandListArgument(opt, optVec);
+      for (size_t i = 0; i < optVec.size(); ++i) {
+        this->AppendFlagEscape(flags, optVec[i]);
+      }
       return;
     }
   }