1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
5 #include "cmConfigure.h" // IWYU pragma: keep
12 #include "cmDepends.h"
14 class cmLocalUnixMakefileGenerator3;
17 * \brief Dependencies files manager.
19 * This class is responsible for maintaining a compiler_depends.make file in
20 * the build tree corresponding to an object file.
22 class cmDependsCompiler
25 cmDependsCompiler() = default;
26 ~cmDependsCompiler() = default;
28 /** should this be verbose in its output */
29 void SetVerbose(bool verb) { this->Verbose = verb; }
31 /** Set the local generator for the directory in which we are
32 scanning dependencies. This is not a full local generator; it
33 has been setup to do relative path conversions for the current
35 void SetLocalGenerator(cmLocalUnixMakefileGenerator3* lg)
37 this->LocalGenerator = lg;
40 /** Read dependencies for the target file. Return true if
41 dependencies didn't changed and false if not.
42 Up-to-date Dependencies will be stored in deps. */
43 bool CheckDependencies(
44 const std::string& internalDepFile,
45 const std::vector<std::string>& depFiles,
46 cmDepends::DependencyMap& dependencies,
47 const std::function<bool(const std::string&)>& isValidPath);
49 /** Write dependencies for the target file. */
50 void WriteDependencies(const cmDepends::DependencyMap& dependencies,
51 std::ostream& makeDepends,
52 std::ostream& internalDepends);
54 /** Clear dependencies for the target so they will be regenerated. */
55 void ClearDependencies(const std::vector<std::string>& depFiles);
59 cmLocalUnixMakefileGenerator3* LocalGenerator = nullptr;