Skip to content

Xcode: Treat .inl files as C++ header files

Generate the explicitFileType as sourcecode.cpp.h instead of just sourcecode. This enables syntax highlighting in Xcode.

Original Description

Treat .inl files as C++ header files ie. to support syntax highlighting in Xcode by default

Before change .inl files are marked as sourcecode file type

`` `98D886A0CE044C0DB5343B96 /* /Users/jake/Workspace/personal/renderdoc/renderdoc/api/replay/pipestate.inl */ = {isa = PBXFileReference; explicitFileType = sourcecode; fileEncoding = 4; name = pipestate.inl; path = renderdoc/api/replay/pipestate.inl; sourceTree = SOURCE_ROOT; };


After change .inl files are marked as `sourcecode.cpp.h` file type

A540004410C2417593B6440A /* /Users/jake/Workspace/personal/renderdoc/renderdoc/api/replay/pipestate.inl */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; name = pipestate.inl; path = renderdoc/api/replay/pipestate.inl; sourceTree = SOURCE_ROOT; };


I do not know the cmake source code and I opted for the smallest change to allow the support of .inl files during Xcode project generation. In principal could expand/change/refactor the Xcode project generation to reuse the existing cmake file classification code ie. `CM_HEADER_REGEX, CM_SOURCE_REGEX, CM_RESOURCE_REGEX, cmGeneratorTarget::ComputeKindedSources, cmMakefile::AddSourceGroup`.

</details>
Edited by Brad King

Merge request reports