From 8b5d6918ab9d5357357a50bcd6cd1bd30d91ec45 Mon Sep 17 00:00:00 2001 From: John Biddiscombe Date: Thu, 14 Jun 2001 17:06:10 -0400 Subject: [PATCH] ERR: allow *.cpp as well as *.cxx etc etc --- Source/cmSourceFile.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index 963f77c6a..be4dbcc97 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()))