summaryrefslogtreecommitdiffstats
path: root/Source/cmExportCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-12-05 14:23:31 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-12-05 14:23:49 (GMT)
commitd101cb07ec732b3b9cdd29bda643ffae3f1e7d92 (patch)
tree569b7cdd68342465b07f3224b989b51c7a10736b /Source/cmExportCommand.cxx
parent4139486a4ff5783f04f320f3aaad182833ad275f (diff)
parenta820877d033069062f2cac83d9e611d5af905d0a (diff)
downloadCMake-d101cb07ec732b3b9cdd29bda643ffae3f1e7d92.zip
CMake-d101cb07ec732b3b9cdd29bda643ffae3f1e7d92.tar.gz
CMake-d101cb07ec732b3b9cdd29bda643ffae3f1e7d92.tar.bz2
Merge topic 'cmFileCopier-error-loss'
a820877d03 errors: avoid constructing a stream before getting the last error 5cf7018af6 cmFileCopier: remember error statuses and get their strings 0639a32d3a cmFileTimes: return status codes from APIs Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !9023
Diffstat (limited to 'Source/cmExportCommand.cxx')
-rw-r--r--Source/cmExportCommand.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx
index 9c3bc61..7d23c91 100644
--- a/Source/cmExportCommand.cxx
+++ b/Source/cmExportCommand.cxx
@@ -485,13 +485,11 @@ static void StorePackageRegistry(cmMakefile& mf, std::string const& package,
if (entry) {
entry << content << "\n";
} else {
- std::ostringstream e;
- /* clang-format off */
- e << "Cannot create package registry file:\n"
- << " " << fname << "\n"
- << cmSystemTools::GetLastSystemError() << "\n";
- /* clang-format on */
- mf.IssueMessage(MessageType::WARNING, e.str());
+ mf.IssueMessage(MessageType::WARNING,
+ cmStrCat("Cannot create package registry file:\n"
+ " ",
+ fname, '\n',
+ cmSystemTools::GetLastSystemError(), '\n'));
}
}
}