[Cmake-commits] [cmake-commits] hoffman committed cmSourceFileLocation.cxx 1.3.2.1 1.3.2.2
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Jul 25 23:23:56 EDT 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv27269/Source
Modified Files:
Tag: CMake-2-6
cmSourceFileLocation.cxx
Log Message:
ENH: merge in from main tree and fix bug for flex and yacc stuff in SecondLife
Index: cmSourceFileLocation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFileLocation.cxx,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -C 2 -d -r1.3.2.1 -r1.3.2.2
*** cmSourceFileLocation.cxx 18 Mar 2008 14:23:54 -0000 1.3.2.1
--- cmSourceFileLocation.cxx 26 Jul 2008 03:23:54 -0000 1.3.2.2
***************
*** 101,104 ****
--- 101,134 ----
this->AmbiguousExtension = false;
}
+ else
+ {
+ // This is not a known extension. See if the file exists on disk as
+ // named.
+ std::string tryPath;
+ if(this->AmbiguousDirectory)
+ {
+ // Check the source tree only because a file in the build tree should
+ // be specified by full path at least once. We do not want this
+ // detection to depend on whether the project has already been built.
+ tryPath = this->Makefile->GetCurrentDirectory();
+ tryPath += "/";
+ }
+ tryPath += this->Directory;
+ tryPath += "/";
+ tryPath += this->Name;
+ if(cmSystemTools::FileExists(tryPath.c_str(), true))
+ {
+ // We found a source file named by the user on disk. Trust it's
+ // extension.
+ this->Name = cmSystemTools::GetFilenameName(name);
+ this->AmbiguousExtension = false;
+
+ // If the directory was ambiguous, it isn't anymore.
+ if(this->AmbiguousDirectory)
+ {
+ this->DirectoryUseSource();
+ }
+ }
+ }
}
More information about the Cmake-commits
mailing list