浏览代码

BUG: don't crash in the generator is EXECUTABLE_OUTPUT_PATH or
LIBRARY_OUTPUT_PATH are empty

Alex

Alexander Neundorf 17 年之前
父节点
当前提交
138c8a0dab
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      Source/cmExtraEclipseCDT4Generator.cxx

+ 3 - 3
Source/cmExtraEclipseCDT4Generator.cxx

@@ -351,7 +351,7 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
         }
       }
     // for EXECUTABLE_OUTPUT_PATH when not in binary dir
-    std::string outputPath = mf->GetDefinition("EXECUTABLE_OUTPUT_PATH");
+    std::string outputPath = mf->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH");
     if (!outputPath.empty() && !cmSystemTools::IsSubDirectory(
                         outputPath.c_str(), this->HomeOutputDirectory.c_str()))
       {
@@ -368,9 +368,9 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
         this->OutLinkedResources.push_back(name);
       }
     // for LIBRARY_OUTPUT_PATH when not in binary dir
-    if (outputPath != mf->GetDefinition("LIBRARY_OUTPUT_PATH"))
+    if (outputPath != mf->GetSafeDefinition("LIBRARY_OUTPUT_PATH"))
       {
-      outputPath = mf->GetDefinition("LIBRARY_OUTPUT_PATH");
+      outputPath = mf->GetSafeDefinition("LIBRARY_OUTPUT_PATH");
       if (!outputPath.empty() && !cmSystemTools::IsSubDirectory(
                         outputPath.c_str(), this->HomeOutputDirectory.c_str()))
         {