summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceFile.cxx
diff options
context:
space:
mode:
authorJohn Biddiscombe <jbiddiscombe@skippingmouse.co.uk>2001-06-14 21:06:10 (GMT)
committerJohn Biddiscombe <jbiddiscombe@skippingmouse.co.uk>2001-06-14 21:06:10 (GMT)
commit8b5d6918ab9d5357357a50bcd6cd1bd30d91ec45 (patch)
treeaebf4b68e67bb9e79068807e86657130318959b7 /Source/cmSourceFile.cxx
parent043f54ca5f8b86a78cd1b19441bdc2a4a074ad9e (diff)
downloadCMake-8b5d6918ab9d5357357a50bcd6cd1bd30d91ec45.zip
CMake-8b5d6918ab9d5357357a50bcd6cd1bd30d91ec45.tar.gz
CMake-8b5d6918ab9d5357357a50bcd6cd1bd30d91ec45.tar.bz2
ERR: allow *.cpp as well as *.cxx etc etc
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r--Source/cmSourceFile.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index 963f77c..be4dbcc 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -108,6 +108,17 @@ void cmSourceFile::SetName(const char* name, const char* dir)
m_FullPath = hname;
return;
}
+ //
+ hname = pathname;
+ hname += ".cpp";
+ if(cmSystemTools::FileExists(hname.c_str()))
+ {
+ m_SourceExtension = "cpp";
+ m_HeaderFileOnly = false;
+ m_FullPath = hname;
+ return;
+ }
+
hname = pathname;
hname += ".h";
if(cmSystemTools::FileExists(hname.c_str()))