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

Method GenerateScriptForConfig

Source/cmInstallGetRuntimeDependenciesGenerator.cxx:140–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140void cmInstallGetRuntimeDependenciesGenerator::GenerateScriptForConfig(
141 std::ostream& os, std::string const& config, Indent indent)
142{
143 std::string installNameTool =
144 this->LocalGenerator->GetMakefile()->GetSafeDefinition(
145 "CMAKE_INSTALL_NAME_TOOL");
146
147 Indent inputIndent = indent;
148 if (this->PolicyStatusCMP0207 != cmPolicies::WARN) {
149 indent = indent.Next();
150 os << inputIndent << "block(SCOPE_FOR POLICIES)\n"
151 << indent << "cmake_policy(SET CMP0207 "
152 << (this->PolicyStatusCMP0207 == cmPolicies::NEW ? "NEW" : "OLD")
153 << ")\n";
154 }
155 os << indent << "file(GET_RUNTIME_DEPENDENCIES\n"
156 << indent << " RESOLVED_DEPENDENCIES_VAR " << this->DepsVar << '\n';
157 WriteFilesArgument(os, "EXECUTABLES"_s,
158 this->RuntimeDependencySet->GetExecutables(), config,
159 indent);
160 WriteFilesArgument(os, "LIBRARIES"_s,
161 this->RuntimeDependencySet->GetLibraries(), config,
162 indent);
163 WriteFilesArgument(os, "MODULES"_s, this->RuntimeDependencySet->GetModules(),
164 config, indent);
165 if (this->RuntimeDependencySet->GetBundleExecutable()) {
166 os << indent << " BUNDLE_EXECUTABLE \""
167 << this->RuntimeDependencySet->GetBundleExecutable()->GetItemPath(
168 config)
169 << "\"\n";
170 }
171 WriteGenexEvaluatorArgument(os, "DIRECTORIES"_s, this->Directories, config,
172 this->LocalGenerator, indent);
173 WriteGenexEvaluatorArgument(os, "PRE_INCLUDE_REGEXES"_s,
174 this->PreIncludeRegexes, config,
175 this->LocalGenerator, indent);
176 WriteGenexEvaluatorArgument(os, "PRE_EXCLUDE_REGEXES"_s,
177 this->PreExcludeRegexes, config,
178 this->LocalGenerator, indent);
179 WriteGenexEvaluatorArgument(os, "POST_INCLUDE_REGEXES"_s,
180 this->PostIncludeRegexes, config,
181 this->LocalGenerator, indent);
182 WriteGenexEvaluatorArgument(os, "POST_EXCLUDE_REGEXES"_s,
183 this->PostExcludeRegexes, config,
184 this->LocalGenerator, indent);
185 WriteGenexEvaluatorArgument(os, "POST_INCLUDE_FILES"_s,
186 this->PostIncludeFiles, config,
187 this->LocalGenerator, indent);
188 WriteGenexEvaluatorArgument(os, "POST_EXCLUDE_FILES"_s,
189 this->PostExcludeFiles, config,
190 this->LocalGenerator, indent);
191
192 std::set<std::string> postExcludeFiles;
193 auto const addPostExclude =
194 [config, &postExcludeFiles, this](
195 std::vector<std::unique_ptr<cmInstallRuntimeDependencySet::Item>> const&
196 tgts) {
197 for (auto const& item : tgts) {

Callers

nothing calls this directly

Calls 8

WriteFilesArgumentFunction · 0.85
GetItemPathMethod · 0.80
GetMakefileMethod · 0.45
NextMethod · 0.45
GetBundleExecutableMethod · 0.45
AddPostExcludeFilesMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected