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

Method Prepare

Source/cmRuntimeDependencyArchive.cxx:143–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143bool cmRuntimeDependencyArchive::Prepare()
144{
145 std::string platform = this->GetMakefile()->GetSafeDefinition(
146 "CMAKE_GET_RUNTIME_DEPENDENCIES_PLATFORM");
147 if (platform.empty()) {
148 std::string systemName =
149 this->GetMakefile()->GetSafeDefinition("CMAKE_HOST_SYSTEM_NAME");
150 if (systemName == "Windows") {
151 platform = "windows+pe";
152 } else if (systemName == "Darwin") {
153 platform = "macos+macho";
154 } else if (systemName == "Linux") {
155 platform = "linux+elf";
156 }
157 }
158 if (platform == "linux+elf") {
159 this->Linker = cm::make_unique<cmBinUtilsLinuxELFLinker>(this);
160 } else if (platform == "windows+pe") {
161 this->Linker = cm::make_unique<cmBinUtilsWindowsPELinker>(this);
162 } else if (platform == "macos+macho") {
163 this->Linker = cm::make_unique<cmBinUtilsMacOSMachOLinker>(this);
164 } else {
165 std::ostringstream e;
166 e << "Invalid value for CMAKE_GET_RUNTIME_DEPENDENCIES_PLATFORM: "
167 << platform;
168 this->SetError(e.str());
169 return false;
170 }
171
172 return this->Linker->Prepare();
173}
174
175bool cmRuntimeDependencyArchive::GetRuntimeDependencies(
176 std::vector<std::string> const& executables,

Callers

nothing calls this directly

Calls 4

GetMakefileMethod · 0.95
SetErrorMethod · 0.95
strMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected