summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJake Turner <jake@evansturner.co.uk>2021-09-26 11:38:02 +0100
committerBrad King <brad.king@kitware.com>2021-09-28 10:49:04 -0400
commit16ea0e57f7ff51ef1d1b64eb270a7762e0c67726 (patch)
tree62b5012195061bdcb1bb7d1ffcacd901c579ec51
parent1edc9e88879d00e7015ce2ab2c6e663ae59a37fe (diff)
downloadcmake-16ea0e57f7ff51ef1d1b64eb270a7762e0c67726.tar.gz
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.
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index c3d60b01a2..d61d373fb6 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1097,7 +1097,7 @@ std::string GetSourcecodeValueFromFileExtension(
} else if (ext == "h") {
sourcecode += ".c.h";
} else if (ext == "hxx" || ext == "hpp" || ext == "txx" || ext == "pch" ||
- ext == "hh") {
+ ext == "hh" || ext == "inl") {
sourcecode += ".cpp.h";
} else if (ext == "png" || ext == "gif" || ext == "jpg") {
keepLastKnownFileType = true;