diff options
author | Seth R Johnson <johnsonsr@ornl.gov> | 2021-10-10 10:31:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-10-12 15:40:45 (GMT) |
commit | fc92d6640b09def31d129f3e347b98af1aa1e098 (patch) | |
tree | 9f25760e5e2f46acb42b2ddcba1e7375ef8795fd /Source/cmFileCommand.cxx | |
parent | 7257539e67930985eef82aeab29cb32ef357aec7 (diff) | |
download | CMake-fc92d6640b09def31d129f3e347b98af1aa1e098.zip CMake-fc92d6640b09def31d129f3e347b98af1aa1e098.tar.gz CMake-fc92d6640b09def31d129f3e347b98af1aa1e098.tar.bz2 |
cmFileCommand: improve error message
Print full list of unresolved dependencies and a phrase that indicates
what about the file is unresolved.
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r-- | Source/cmFileCommand.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index d2341c5..fd0595d 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -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; } |