Skip to content

Commit 170f3f3

Browse files
authored
Add support for objective C/C++ files
Fixes #134
1 parent b615d52 commit 170f3f3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiledb/compiler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ def __init__(self, name="gcc"):
2020
# Supported languages by the compiler
2121
self._languages = {
2222
"c": {
23-
"extensions": ["c"]
23+
"extensions": ["c", "m"]
2424
},
2525
"c++": {
26-
"extensions": ["cpp", "cc", "cx", "cxx"],
26+
"extensions": ["cpp", "cc", "cx", "cxx", "mm"],
2727
},
2828
}
2929

compiledb/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# Internal variables used to parse build log entries
2929
cc_compile_regex = re.compile(r"^.*-?g?cc-?[0-9.]*$|^.*-?clang-?[0-9.]*$")
3030
cpp_compile_regex = re.compile(r"^.*-?[gc]\+\+-?[0-9.]*$|^.*-?clang\+\+-?[0-9.]*$")
31-
file_regex = re.compile(r"^.+\.c$|^.+\.cc$|^.+\.cpp$|^.+\.cxx$|^.+\.s$", re.IGNORECASE)
31+
file_regex = re.compile(r"^.+\.c$|^.+\.cc$|^.+\.m$|^.+\.mm$|^.+\.cpp$|^.+\.cxx$|^.+\.s$", re.IGNORECASE)
3232
compiler_wrappers = {"ccache", "icecc", "sccache"}
3333

3434
# Leverage `make --print-directory` option

0 commit comments

Comments
 (0)