summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceFile.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-06-20 17:56:38 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-06-20 17:56:38 (GMT)
commitadbae91cb5a5cb4cd33df273dd977791406ec339 (patch)
tree6bf114389890b3be2ba49e3c189bb67d5b5f8d6e /Source/cmSourceFile.cxx
parent7715b382fe71932aa36333659b7a2311008d0f06 (diff)
downloadCMake-adbae91cb5a5cb4cd33df273dd977791406ec339.zip
CMake-adbae91cb5a5cb4cd33df273dd977791406ec339.tar.gz
CMake-adbae91cb5a5cb4cd33df273dd977791406ec339.tar.bz2
ENH: fix cmake so it can boot strap itself better
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r--Source/cmSourceFile.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index be4dbcc..0783115 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -74,6 +74,13 @@ void cmSourceFile::SetName(const char* name, const char* dir)
std::string hname = pathname;
if(cmSystemTools::FileExists(hname.c_str()))
{
+ std::string::size_type pos = hname.rfind('.');
+ if(pos != std::string::npos)
+ {
+ m_SourceExtension = hname.substr(pos+1, hname.size()-pos);
+ m_SourceName = hname.substr(0, pos);
+ }
+
m_HeaderFileOnly = false;
m_FullPath = hname;
return;