diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-06-21 17:48:08 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-06-21 17:48:08 (GMT) |
commit | a7d114cfd6099b7f6acfb658adf3a39f6792cdbd (patch) | |
tree | 10965e0b220401c2832cb32ef214fc65a0effcb9 /Source/cmSourceFile.cxx | |
parent | 796fc4c4959ba18890bdaf01f9891c6ce4bc8a64 (diff) | |
download | CMake-a7d114cfd6099b7f6acfb658adf3a39f6792cdbd.zip CMake-a7d114cfd6099b7f6acfb658adf3a39f6792cdbd.tar.gz CMake-a7d114cfd6099b7f6acfb658adf3a39f6792cdbd.tar.bz2 |
BUG: fix bootstrap build on unix
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r-- | Source/cmSourceFile.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index 0783115..29e7444 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -78,7 +78,15 @@ void cmSourceFile::SetName(const char* name, const char* dir) if(pos != std::string::npos) { m_SourceExtension = hname.substr(pos+1, hname.size()-pos); - m_SourceName = hname.substr(0, pos); + std::string::size_type pos2 = hname.rfind('/'); + if(pos2 != std::string::npos) + { + m_SourceName = hname.substr(pos2+1, pos - pos2-1); + } + else + { + m_SourceName = hname.substr(0, pos); + } } m_HeaderFileOnly = false; |