| 49 | } |
| 50 | |
| 51 | bool 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 | |
| 80 | bool cmBinUtilsWindowsPELinker::ScanDependencies( |
| 81 | std::string const& file, cmStateEnums::TargetType /* unused */) |
nothing calls this directly
no test coverage detected