summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceFile.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2004-04-27 13:22:57 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2004-04-27 13:22:57 (GMT)
commit482eef71122acf6408e0d5bd02161bb832155f08 (patch)
tree61500ef9273621f9d8816b2286ed6c8838137e30 /Source/cmSourceFile.cxx
parentc19a70b3ada66a59c7a0ff78bf1a4a1cd557db9a (diff)
downloadCMake-482eef71122acf6408e0d5bd02161bb832155f08.zip
CMake-482eef71122acf6408e0d5bd02161bb832155f08.tar.gz
CMake-482eef71122acf6408e0d5bd02161bb832155f08.tar.bz2
BUG: Fix aus source dir and add better testing of it
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r--Source/cmSourceFile.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index b8a547a..ed8d63f 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -30,12 +30,8 @@ void cmSourceFile::SetName(const char* name, const char* dir,
this->SetProperty("HEADER_FILE_ONLY","1");
- m_SourceName = cmSystemTools::GetFilenamePath(name);
- if ( m_SourceName.size() > 0 )
- {
- m_SourceName += "/";
- }
- m_SourceName += cmSystemTools::GetFilenameWithoutLastExtension(name);
+
+ m_SourceName = name;
std::string pathname = dir;
@@ -58,6 +54,12 @@ void cmSourceFile::SetName(const char* name, const char* dir,
std::string hname = pathname;
if(cmSystemTools::FileExists(hname.c_str()))
{
+ m_SourceName = cmSystemTools::GetFilenamePath(name);
+ if ( m_SourceName.size() > 0 )
+ {
+ m_SourceName += "/";
+ }
+ m_SourceName += cmSystemTools::GetFilenameWithoutLastExtension(name);
std::string::size_type pos = hname.rfind('.');
if(pos != std::string::npos)
{
@@ -74,7 +76,7 @@ void cmSourceFile::SetName(const char* name, const char* dir,
// See if the file is a header file
if(std::find( headerExts.begin(), headerExts.end(), m_SourceExtension ) ==
- headerExts.end())
+ headerExts.end())
{
this->SetProperty("HEADER_FILE_ONLY","0");
}