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

Method Prepare

Source/cmBinUtilsWindowsPELinker.cxx:51–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51bool cmBinUtilsWindowsPELinker::Prepare()
52{
53 std::string tool = this->Archive->GetGetRuntimeDependenciesTool();
54 if (tool.empty()) {
55 std::vector<std::string> command;
56 if (this->Archive->GetGetRuntimeDependenciesCommand("dumpbin", command)) {
57 tool = "dumpbin";
58 } else {
59 tool = "objdump";
60 }
61 }
62 if (tool == "dumpbin") {
63 this->Tool =
64 cm::make_unique<cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool>(
65 this->Archive);
66 } else if (tool == "objdump") {
67 this->Tool =
68 cm::make_unique<cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool>(
69 this->Archive);
70 } else {
71 std::ostringstream e;
72 e << "Invalid value for CMAKE_GET_RUNTIME_DEPENDENCIES_TOOL: " << tool;
73 this->SetError(e.str());
74 return false;
75 }
76
77 return true;
78}
79
80bool cmBinUtilsWindowsPELinker::ScanDependencies(
81 std::string const& file, cmStateEnums::TargetType /* unused */)

Callers

nothing calls this directly

Calls 4

strMethod · 0.80
emptyMethod · 0.45
SetErrorMethod · 0.45

Tested by

no test coverage detected