浏览代码

BUG: fix for bug 373 make depend problem

Bill Hoffman 22 年之前
父节点
当前提交
9d4aefc088
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      Source/cmMakeDepend.cxx

+ 4 - 2
Source/cmMakeDepend.cxx

@@ -324,7 +324,8 @@ std::string cmMakeDepend::FullPath(const char* fname, const char *extraPath)
       path = path + "/";
       path = path + "/";
       }
       }
     path = path + fname;
     path = path + fname;
-    if(cmSystemTools::FileExists(path.c_str()))
+    if(cmSystemTools::FileExists(path.c_str())
+       && !cmSystemTools::FileIsDirectory(path.c_str()))
       {
       {
       std::string fp = cmSystemTools::CollapseFullPath(path.c_str());
       std::string fp = cmSystemTools::CollapseFullPath(path.c_str());
       m_DirectoryToFileToPathMap[extraPath? extraPath: ""][fname] = fp;
       m_DirectoryToFileToPathMap[extraPath? extraPath: ""][fname] = fp;
@@ -340,7 +341,8 @@ std::string cmMakeDepend::FullPath(const char* fname, const char *extraPath)
       path = path + "/";
       path = path + "/";
       }
       }
     path = path + fname;
     path = path + fname;
-    if(cmSystemTools::FileExists(path.c_str()))
+    if(cmSystemTools::FileExists(path.c_str())
+       && !cmSystemTools::FileIsDirectory(path.c_str()))
       {
       {
       std::string fp = cmSystemTools::CollapseFullPath(path.c_str());
       std::string fp = cmSystemTools::CollapseFullPath(path.c_str());
       m_DirectoryToFileToPathMap[extraPath][fname] = fp;
       m_DirectoryToFileToPathMap[extraPath][fname] = fp;