[Cmake-commits] [cmake-commits] king committed cmSourceFile.cxx 1.51 1.52
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue May 27 13:10:12 EDT 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv8689/Source
Modified Files:
cmSourceFile.cxx
Log Message:
ENH: Catch missing source files specified by full path earlier.
- Revert previous change to trust user-provided full paths.
- Instead trust them only far enough to determine the source language
but still check for existence for non-generated sources.
Index: cmSourceFile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFile.cxx,v
retrieving revision 1.51
retrieving revision 1.52
diff -C 2 -d -r1.51 -r1.52
*** cmSourceFile.cxx 29 Apr 2008 18:17:42 -0000 1.51
--- cmSourceFile.cxx 27 May 2008 17:10:09 -0000 1.52
***************
*** 56,60 ****
if(this->FullPath.empty() && this->Language.empty())
{
! if(this->Location.ExtensionIsAmbiguous())
{
// Finalize the file location to get the extension and set the
--- 56,66 ----
if(this->FullPath.empty() && this->Language.empty())
{
! // If a known extension is given or a known full path is given
! // then trust that the current extension is sufficient to
! // determine the language. This will fail only if the user
! // specifies a full path to the source but leaves off the
! // extension, which is kind of weird.
! if(this->Location.ExtensionIsAmbiguous() &&
! this->Location.DirectoryIsAmbiguous())
{
// Finalize the file location to get the extension and set the
***************
*** 186,199 ****
}
- // If the user provided a full path, trust it. If the file is not
- // there the native tool will complain at build time.
- if(!this->Location.DirectoryIsAmbiguous())
- {
- this->FullPath = this->Location.GetDirectory();
- this->FullPath += "/";
- this->FullPath += this->Location.GetName();
- return true;
- }
-
cmOStringStream e;
e << "Cannot find source file \"" << this->Location.GetName() << "\"";
--- 192,195 ----
More information about the Cmake-commits
mailing list