Browse Source

BUG: AppendAnyDepend must handle non-existing files.

Brad King 21 years ago
parent
commit
e8ef42ed74
1 changed files with 4 additions and 8 deletions
  1. 4 8
      Source/cmLocalUnixMakefileGenerator2.cxx

+ 4 - 8
Source/cmLocalUnixMakefileGenerator2.cxx

@@ -2078,7 +2078,7 @@ cmLocalUnixMakefileGenerator2
   // There are a few cases for the name of the target:
   //  - CMake target in this directory: depend on it.
   //  - CMake target in another directory: depend and add jump-and-build.
-  //  - Full path to an outside file: depend on it.
+  //  - Full path to a file: depend on it.
   //  - Other format (like -lm): do nothing.
 
   // If it is an executable or library target there will be a
@@ -2180,14 +2180,10 @@ cmLocalUnixMakefileGenerator2
     // directly.
     depends.push_back(name);
     }
-  else
+  else if(cmSystemTools::FileIsFullPath(name))
     {
-    // This is not a CMake target.  If it exists and is a full path we
-    // can depend on it.
-    if(cmSystemTools::FileExists(name) && cmSystemTools::FileIsFullPath(name))
-      {
-      depends.push_back(name);
-      }
+    // This is a path to a file.  Just trust that it will be present.
+    depends.push_back(name);
     }
 }