MCPcopy Create free account
hub / github.com/FastLED/FastLED / needs_compilation

Function needs_compilation

ci/wasm_compile_native.py:140–157  ·  view source on GitHub ↗

Check if source needs recompilation. Args: source_file: Source .cpp file output_object: Output .o file Returns: True if compilation needed, False if up-to-date

(source_file: Path, output_object: Path)

Source from the content-addressed store, hash-verified

138
139
140def needs_compilation(source_file: Path, output_object: Path) -> bool:
141 """
142 Check if source needs recompilation.
143
144 Args:
145 source_file: Source .cpp file
146 output_object: Output .o file
147
148 Returns:
149 True if compilation needed, False if up-to-date
150 """
151 if not output_object.exists():
152 return True
153
154 source_mtime = source_file.stat().st_mtime
155 object_mtime = output_object.stat().st_mtime
156
157 return source_mtime > object_mtime
158
159
160def compile_object(

Callers 2

compile_objectFunction · 0.85
compile_wasmFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected