From 8843407d52d7e68d4e7996ba28191e27d193fd07 Mon Sep 17 00:00:00 2001 From: Matthew Woehlke Date: Fri, 20 Dec 2024 13:29:53 -0500 Subject: [PATCH] cmPackageInfoReader: Improve warning messages Adjust some warning messages to quote information that comes from the file(s) being read. --- Source/cmPackageInfoReader.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/cmPackageInfoReader.cxx b/Source/cmPackageInfoReader.cxx index 63b4038c3a..e735304695 100644 --- a/Source/cmPackageInfoReader.cxx +++ b/Source/cmPackageInfoReader.cxx @@ -249,9 +249,9 @@ void AppendLanguageProperties(cmMakefile* makefile, cmTarget* target, cm::string_view const lang = MapLanguage(originalLang); if (lang.empty()) { makefile->IssueMessage(MessageType::WARNING, - cmStrCat("ignoring unknown language "_s, - originalLang, " in "_s, key, " for "_s, - target->GetName())); + cmStrCat(R"(ignoring unknown language ")"_s, + originalLang, R"(" in )"_s, key, + " for "_s, target->GetName())); continue; } @@ -514,10 +514,10 @@ void cmPackageInfoReader::SetTargetProperties( cm::string_view const originalLang = IterKey(ldi); cm::string_view const lang = MapLanguage(originalLang); if (lang.empty()) { - makefile->IssueMessage(MessageType::WARNING, - cmStrCat("ignoring unknown language "_s, - originalLang, " in definitions for "_s, - target->GetName())); + makefile->IssueMessage( + MessageType::WARNING, + cmStrCat(R"(ignoring unknown language ")"_s, originalLang, + R"(" in definitions for )"_s, target->GetName())); continue; } @@ -629,9 +629,9 @@ bool cmPackageInfoReader::ImportTargets(cmMakefile* makefile, makefile, cmStateEnums::INTERFACE_LIBRARY, fullName, *ci, package); } else { makefile->IssueMessage(MessageType::WARNING, - cmStrCat("component "_s, fullName, - " has unknown type "_s, type, - " and was not imported"_s)); + cmStrCat(R"(component ")"_s, fullName, + R"(" has unknown type ")"_s, type, + R"(" and was not imported)"_s)); } if (target) {