summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceFile.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-07-16 14:14:41 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-07-16 14:14:41 (GMT)
commit556d27c9eb075dfedb4c1262d51138f2ddf5daad (patch)
treeb5e8a8bc989b808bf54f134db1a2a20b2802def9 /Source/cmSourceFile.cxx
parentd823632c8bc2d9d66e3350e4ceb357f3227c7ea2 (diff)
downloadCMake-556d27c9eb075dfedb4c1262d51138f2ddf5daad.zip
CMake-556d27c9eb075dfedb4c1262d51138f2ddf5daad.tar.gz
CMake-556d27c9eb075dfedb4c1262d51138f2ddf5daad.tar.bz2
ENH: add support for mac osx
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r--Source/cmSourceFile.cxx22
1 files changed, 21 insertions, 1 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index 29e7444..2081575 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -135,6 +135,26 @@ void cmSourceFile::SetName(const char* name, const char* dir)
}
hname = pathname;
+ hname += ".m";
+ if(cmSystemTools::FileExists(hname.c_str()))
+ {
+ m_SourceExtension = "m";
+ m_HeaderFileOnly = false;
+ m_FullPath = hname;
+ return;
+ }
+
+ hname = pathname;
+ hname += ".M";
+ if(cmSystemTools::FileExists(hname.c_str()))
+ {
+ m_SourceExtension = "M";
+ m_HeaderFileOnly = false;
+ m_FullPath = hname;
+ return;
+ }
+
+ hname = pathname;
hname += ".h";
if(cmSystemTools::FileExists(hname.c_str()))
{
@@ -144,7 +164,7 @@ void cmSourceFile::SetName(const char* name, const char* dir)
}
cmSystemTools::Error("can not find file ", hname.c_str());
- cmSystemTools::Error("Tried .txx .cxx .c for ", hname.c_str());
+ cmSystemTools::Error("Tried .cxx .c .txx .cpp .m .M .h for ", hname.c_str());
}
void cmSourceFile::SetName(const char* name, const char* dir, const char *ext,