MCPcopy Create free account
hub / github.com/doldecomp/mkdd / get_pch_out_name

Function get_pch_out_name

tools/project.py:359–366  ·  view source on GitHub ↗
(config: ProjectConfig, pch: PrecompiledHeader)

Source from the content-addressed store, hash-verified

357
358
359def get_pch_out_name(config: ProjectConfig, pch: PrecompiledHeader) -> str:
360 pch_rel_path = Path(pch["source"])
361 pch_out_name = pch_rel_path.with_suffix(".mch")
362 # Use absolute path as a workaround to allow this target to be matched with absolute paths in depfiles.
363 #
364 # Without this any object which includes the PCH would depend on the .mch filesystem entry but not the
365 # corresponding Ninja task, so the MCH would not be implicitly rebuilt when the PCH is modified.
366 return os.path.abspath(config.out_path() / "include" / pch_out_name)
367
368
369# Unit configuration

Callers 1

generate_build_ninjaFunction · 0.85

Calls 1

out_pathMethod · 0.80

Tested by

no test coverage detected