Skip to content

Revert "Ninja: Use full path for all source files"

Brad King requested to merge brad.king/cmake:ninja-no-full-path into master

This reverts commit 955c2a63. Unfortunately using absolute paths can cause incorrect rebuilds due to ninja limitations. The ninja manual explains:

... using absolute paths, your depfile may result in a mixture of relative and absolute paths. Paths used by other build rules need to match exactly.

Passing an absolute path to a source file to the compiler while using a relative path in the ninja build manifest can cause such mixture and lead to incorrect rebuilds. Simply revert the change for now.

Note that there was a follow-up to the original change in !170 (merged). We don't need to revert that because that change made the relevant code cleverly adapt to whatever variable we use to reference the source file.

Fixes: #16675 (closed)
Issue: #13894 (closed)

Merge request reports