Handle .C extension in Xcode.

This commit is contained in:
Jussi Pakkanen 2021-08-20 17:00:15 +03:00
parent e0ab7290f0
commit 12e7b3afcf
1 changed files with 4 additions and 1 deletions

View File

@ -326,7 +326,10 @@ class XCodeBackend(backends.Backend):
self.generate_regen_info()
def get_xcodetype(self, fname):
xcodetype = XCODETYPEMAP.get(fname.split('.')[-1].lower())
extension = fname.split('.')[-1]
if extension == 'C':
extension = 'cpp'
xcodetype = XCODETYPEMAP.get(extension.lower())
if not xcodetype:
xcodetype = 'sourcecode.unknown'
return xcodetype