mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
cmFileCommand: improve error message
Print full list of unresolved dependencies and a phrase that indicates what about the file is unresolved.
This commit is contained in:
committed by
Brad King
parent
7257539e67
commit
fc92d6640b
@@ -3170,9 +3170,12 @@ bool HandleGetRuntimeDependenciesCommand(std::vector<std::string> const& args,
|
||||
archive.GetUnresolvedPaths().begin(),
|
||||
archive.GetUnresolvedPaths().end());
|
||||
} else {
|
||||
auto it = archive.GetUnresolvedPaths().begin();
|
||||
assert(it != archive.GetUnresolvedPaths().end());
|
||||
status.SetError(cmStrCat("Could not resolve file ", *it));
|
||||
std::ostringstream e;
|
||||
e << "Could not resolve runtime dependencies:";
|
||||
for (auto const& path : archive.GetUnresolvedPaths()) {
|
||||
e << "\n " << path;
|
||||
}
|
||||
status.SetError(e.str());
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user