1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-15 12:16:40 +08:00
Commit Graph

5 Commits

Author SHA1 Message Date
Brad King
bd12b97d05 cmScanDepFormat: Drop unused "outputs", "inputs", and "depends" fields
These fields are specified by our `P1689r3` paper, but are not actually
needed.  The dependencies of the scanning results themselves can be
captured via normal depfile logic.  Avoid saving this possibly-large
information in the scanning results.  It is not needed by later steps.
2021-05-13 08:33:00 -04:00
Brad King
3a71534402 Ninja: Restore support for Fortran in a symlinked build tree
Since commit f3eed2c49d (cmGlobalNinjaGenerator: use P1689 dependency
file format for Fortran, 2019-03-12, v3.20.0-rc1~454^2), Fortran stopped
working in a build tree whose path contains a symlink.  The reason is
that the P1689r3 format's `work-directory` field gets populated with the
realpath (via `getcwd`) of the build tree instead of the logical path to
the build tree used for generating relative paths in `build.ninja`.
This causes the `Fortran.dd` file to get absolute (real)paths to `.o`
files, and Ninja does not match them with the relative `.o` file paths
in `build.ninja`.

Fix this by dropping use of the `work-directory` field.  This restores
our prior approach of generating paths in the dyndep file using the same
forms of paths received from the buildsystem generator.  The P1689r3
paper's format may need to be revised to account for this.

Fixes: #21683
2021-05-12 10:15:43 -04:00
Brad King
988f997100 cmScanDepFormat: Fix name of our internal tool in parse errors
We parse the scan result `.ddi` files in `-E cmake_ninja_dyndep`,
not `-E cmake_ninja_depends`.
2021-01-05 09:29:18 -05:00
Brad King
2cb1d77c58 scandep: update format to P1689 R3
The `work-directory` field has been moved into individual rules since
each one may correspond to a different compiler invocation and therefore
a different work directory.

Support for arbitrary binary paths has been removed for simplicity.
We now assume paths have a valid UTF-8 round-trip representation.
2020-11-18 10:42:57 -05:00
Ben Boeckel
a02c4ccabc cmScanDepFormat: add reader and writer for the format from P1689R2
This format is currently subject to change, but is not too far from the
end goal.

Some bits are currently unimplemented (see TODO comments).
2020-11-17 13:16:05 -05:00