[cmake-commits] king committed cmSourceFile.cxx 1.35.8.6 1.35.8.7 cmSourceFile.h 1.21.2.5 1.21.2.6

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Jun 13 17:06:29 EDT 2007


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv8883

Modified Files:
      Tag: CMake-SourceFile2-b
	cmSourceFile.cxx cmSourceFile.h 
Log Message:
ENH: Make sure FindFullPath does not complain more than once about not finding the file if it fails.


Index: cmSourceFile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFile.cxx,v
retrieving revision 1.35.8.6
retrieving revision 1.35.8.7
diff -u -d -r1.35.8.6 -r1.35.8.7
--- cmSourceFile.cxx	13 Jun 2007 20:58:35 -0000	1.35.8.6
+++ cmSourceFile.cxx	13 Jun 2007 21:06:26 -0000	1.35.8.7
@@ -28,6 +28,7 @@
 {
   this->CustomCommand = 0;
   this->Properties.SetCMakeInstance(mf->GetCMakeInstance());
+  this->FindFullPathFailed = false;
 }
 
 //----------------------------------------------------------------------------
@@ -96,6 +97,12 @@
 //----------------------------------------------------------------------------
 bool cmSourceFile::FindFullPath()
 {
+  // If thie method has already failed once do not try again.
+  if(this->FindFullPathFailed)
+    {
+    return false;
+    }
+
   // If the file is generated compute the location without checking on
   // disk.
   if(this->GetPropertyAsBool("GENERATED"))
@@ -168,6 +175,7 @@
     e << " ." << *ext;
     }
   cmSystemTools::Error(e.str().c_str());
+  this->FindFullPathFailed = true;
   return false;
 }
 

Index: cmSourceFile.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFile.h,v
retrieving revision 1.21.2.5
retrieving revision 1.21.2.6
diff -u -d -r1.21.2.5 -r1.21.2.6
--- cmSourceFile.h	13 Jun 2007 20:58:35 -0000	1.21.2.5
+++ cmSourceFile.h	13 Jun 2007 21:06:26 -0000	1.21.2.6
@@ -94,6 +94,7 @@
   std::string Extension;
   std::string Language;
   std::string FullPath;
+  bool FindFullPathFailed;
 
   bool FindFullPath();
   bool TryFullPath(const char* tryPath, const char* ext);



More information about the Cmake-commits mailing list