MCPcopy Create free account
hub / github.com/Kitware/CMake / cmMakefile

Class cmMakefile

Source/cmMakefile.h:82–1268  ·  view source on GitHub ↗

\class cmMakefile * \brief Process the input CMakeLists.txt file. * * Process and store into memory the input CMakeLists.txt file. * Each CMakeLists.txt file is parsed and the commands found there * are added into the build process. */

Source from the content-addressed store, hash-verified

80 * are added into the build process.
81 */
82class cmMakefile
83{
84public:
85 /* Mark a variable as used */
86 void MarkVariableAsUsed(std::string const& var);
87 /* return true if a variable has been initialized */
88 bool VariableInitialized(std::string const&) const;
89
90 /**
91 * Construct an empty makefile.
92 */
93 cmMakefile(cmGlobalGenerator* globalGenerator,
94 cmStateSnapshot const& snapshot);
95
96 /**
97 * Destructor.
98 */
99 ~cmMakefile();
100
101 cmMakefile(cmMakefile const&) = delete;
102 cmMakefile& operator=(cmMakefile const&) = delete;
103
104 cmDirectoryId GetDirectoryId() const;
105
106 bool ReadListFile(std::string const& filename);
107
108 bool ReadListFileAsString(std::string const& content,
109 std::string const& virtualFileName);
110
111 bool ReadDependentFile(std::string const& filename,
112 bool noPolicyScope = true);
113
114 /**
115 * Add a function blocker to this makefile
116 */
117 void AddFunctionBlocker(std::unique_ptr<cmFunctionBlocker> fb);
118
119 /// @return whether we are processing the top CMakeLists.txt file.
120 bool IsRootMakefile() const;
121
122 /**
123 * Remove the function blocker whose scope ends with the given command.
124 * This returns ownership of the function blocker object.
125 */
126 std::unique_ptr<cmFunctionBlocker> RemoveFunctionBlocker();
127
128 /**
129 * Try running cmake and building a file. This is used for dynamically
130 * loaded commands, not as part of the usual build process.
131 */
132 int TryCompile(std::string const& srcdir, std::string const& bindir,
133 std::string const& projectName, std::string const& targetName,
134 bool fast, int jobs,
135 std::vector<std::string> const* cmakeArgs,
136 std::string& output);
137
138 bool GetIsSourceFileTryCompile() const;
139

Callers

nothing calls this directly

Calls 3

GetPropertyMethod · 0.95
cmNewLineStyleClass · 0.85
PolicyMapClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…