Skip to content

Commit 0b58a3d

Browse files
committed
1 parent 4f28899 commit 0b58a3d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

refresh.template.py

+5
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,11 @@ def _get_files(compile_action):
615615

616616
# Getting the source file is a little trickier than it might seem.
617617

618+
is_precompiled_header = any([arg == "-xc++-header" for arg in compile_action.arguments])
619+
if is_precompiled_header:
620+
header_files = [arg for arg in compile_action.arguments if not arg.startswith('-') and arg.endswith(".h")]
621+
return set(), set(header_files)
622+
618623
# First, we do the obvious thing: Filter args to those that look like source files.
619624
source_file_candidates = [arg for arg in compile_action.arguments if not arg.startswith('-') and arg.endswith(_get_files.source_extensions)]
620625
assert source_file_candidates, f"No source files found in compile args: {compile_action.arguments}.\nPlease file an issue with this information!"

0 commit comments

Comments
 (0)