[cmake-commits] king committed cmSourceFile.cxx 1.35.8.5 1.35.8.6
cmSourceFile.h 1.21.2.4 1.21.2.5
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Jun 13 16:58:37 EDT 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv6531
Modified Files:
Tag: CMake-SourceFile2-b
cmSourceFile.cxx cmSourceFile.h
Log Message:
ENH: Use non-const==>locate policy for GetLanguage() method.
Index: cmSourceFile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFile.cxx,v
retrieving revision 1.35.8.5
retrieving revision 1.35.8.6
diff -u -d -r1.35.8.5 -r1.35.8.6
--- cmSourceFile.cxx 13 Jun 2007 20:22:31 -0000 1.35.8.5
+++ cmSourceFile.cxx 13 Jun 2007 20:58:35 -0000 1.35.8.6
@@ -43,6 +43,19 @@
}
//----------------------------------------------------------------------------
+const char* cmSourceFile::GetLanguage()
+{
+ // Compute the final location of the file if necessary.
+ if(this->FullPath.empty())
+ {
+ this->GetFullPath();
+ }
+
+ // Now try to determine the language.
+ return static_cast<cmSourceFile const*>(this)->GetLanguage();
+}
+
+//----------------------------------------------------------------------------
const char* cmSourceFile::GetLanguage() const
{
// If the language was set explicitly by the user then use it.
Index: cmSourceFile.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFile.h,v
retrieving revision 1.21.2.4
retrieving revision 1.21.2.5
diff -u -d -r1.21.2.4 -r1.21.2.5
--- cmSourceFile.h 13 Jun 2007 20:12:13 -0000 1.21.2.4
+++ cmSourceFile.h 13 Jun 2007 20:58:35 -0000 1.21.2.5
@@ -66,6 +66,7 @@
/**
* Get the language of the compiler to use for this source file.
*/
+ const char* GetLanguage();
const char* GetLanguage() const;
/**
More information about the Cmake-commits
mailing list