1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-06-13 22:30:25 +08:00

14 Commits

Author SHA1 Message Date
Brad King
241ee252ce IWYU: Update for Debian 12 CI job
`include-what-you-use` diagnostics, in practice, are specific to
the environment's compiler and standard library.  Update includes
to satisfy IWYU for our CI job under Debian 12.
2023-07-28 09:14:08 -04:00
Marc Chevrier
375e6fdbbe Link step: use linker dependency linker file
Based on work done by @ben.boeckel (!8051)

Fixes: #22217
2023-05-03 17:08:07 +02:00
Marc Chevrier
0b65a2b253 add_custom_command(DEPFILE): ensure all dependencies are taken into account 2022-01-16 16:21:12 +01:00
Brad King
6bc6ffb9a9 Merge branch 'backport-3.20-makefile-normalize-depfile' 2021-07-02 10:01:09 -04:00
Marc Chevrier
6a6efdcaed Makefiles: Normalize compiler-generated depfile paths
Even though Makefile generators pass source files and include
directories by absolute path to the compiler, the compiler may generate
depfile paths relative to the current working directory.  For example,
`ccache` with `CCACHE_BASEDIR` may transform paths this way.  When
reading a depfile, convert relative dependencies to absolute paths
before placing them in `compiler_depend.make`, which is later evaluated
in the top-level build directory.

Fixes: #22364
2021-07-02 09:24:57 -04:00
Brad King
15fa320071 cmLocalGenerator: Factor out relative path conversion helpers
Most calls to `MaybeConvertToRelativePath` use one of our common work
directories (e.g. top of the build tree) as the local path.  Add helpers
for each of the common cases to simplify and clarify call sites.
2021-05-13 12:47:25 -04:00
Marc Chevrier
b5c2163293 Ninja: add_custom_command(DEPFILE): Ensure dependencies consistency
Fixes: #21694
2021-01-19 13:17:14 +01:00
Brad King
91f0f4aa73 Merge topic 'explicit-this-fix'
209daa20b2 Code style: add missed explicit 'this->'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5400
2021-01-06 10:20:57 -05:00
Kai Wang
b696f78073 cmDepends: merge dependers of depend makefile
Since one depender has multiple dependees, depend makefile generated
same depender line by line, to reduce file size and refine make file
parse speed, merge same dependers to one. And add a testcase for
large depend.make which generated source file includes 20000 header
files and run build and incremental build

Signed-off-by: Wangkai <wangkai86@huawei.com>
Signed-off-by: Zhaoyingdong <zhaoyingdong@huawei.com>
2021-01-05 07:48:27 -05:00
Oleksandr Koval
209daa20b2 Code style: add missed explicit 'this->'
CMake uses explicit 'this->' style. Using custom clang-tidy check we can
detect and fix places where 'this->' was missed.
2021-01-05 14:32:36 +02:00
Marc Chevrier
cfd8a5ac1f Makefiles: Add support of DEPFILE for add_custom_command
Issue: #20286
Fixes: #21415
2020-12-23 15:47:46 +01:00
Marc Chevrier
b2ff3c52df cmDependsCompiler: rely now on cmGccDepfileReader for depfile parser
To avoid duplicate effort of depfile parsing and enhance robustness
of parsing against mal-formed depfiles in preparation of DEPFILE option
support of add_custom_command command for makefiles generators.
2020-12-11 14:48:00 +01:00
Marc Chevrier
f395caf498 Makefiles dependencies: enhance robustness of deps parser 2020-12-03 15:06:33 +01:00
Marc Chevrier
2c71d051fa Makefiles Generators: use compiler for dependencies generation
Each source compilation generates a dependencies file. These dependencies
files are consolidated in one file per target. This consolidation is done
as part of command 'cmake -E cmake_depends` launched before evaluation of
makefile dependency graph.

The consolidation uses the same approach as `CMake` dependencies management.

Fixes: #21321
2020-11-29 15:25:42 +01:00