(config: ProjectConfig, pch: PrecompiledHeader)
| 357 | |
| 358 | |
| 359 | def 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 |
no test coverage detected