cmPackageInfoReader: Improve warning messages

Adjust some warning messages to quote information that comes from the
file(s) being read.
This commit is contained in:
Matthew Woehlke
2024-12-20 13:29:53 -05:00
committed by Brad King
parent 5fb1726761
commit 8843407d52
+10 -10
View File
@@ -249,9 +249,9 @@ void AppendLanguageProperties(cmMakefile* makefile, cmTarget* target,
cm::string_view const lang = MapLanguage(originalLang); cm::string_view const lang = MapLanguage(originalLang);
if (lang.empty()) { if (lang.empty()) {
makefile->IssueMessage(MessageType::WARNING, makefile->IssueMessage(MessageType::WARNING,
cmStrCat("ignoring unknown language "_s, cmStrCat(R"(ignoring unknown language ")"_s,
originalLang, " in "_s, key, " for "_s, originalLang, R"(" in )"_s, key,
target->GetName())); " for "_s, target->GetName()));
continue; continue;
} }
@@ -514,10 +514,10 @@ void cmPackageInfoReader::SetTargetProperties(
cm::string_view const originalLang = IterKey(ldi); cm::string_view const originalLang = IterKey(ldi);
cm::string_view const lang = MapLanguage(originalLang); cm::string_view const lang = MapLanguage(originalLang);
if (lang.empty()) { if (lang.empty()) {
makefile->IssueMessage(MessageType::WARNING, makefile->IssueMessage(
cmStrCat("ignoring unknown language "_s, MessageType::WARNING,
originalLang, " in definitions for "_s, cmStrCat(R"(ignoring unknown language ")"_s, originalLang,
target->GetName())); R"(" in definitions for )"_s, target->GetName()));
continue; continue;
} }
@@ -629,9 +629,9 @@ bool cmPackageInfoReader::ImportTargets(cmMakefile* makefile,
makefile, cmStateEnums::INTERFACE_LIBRARY, fullName, *ci, package); makefile, cmStateEnums::INTERFACE_LIBRARY, fullName, *ci, package);
} else { } else {
makefile->IssueMessage(MessageType::WARNING, makefile->IssueMessage(MessageType::WARNING,
cmStrCat("component "_s, fullName, cmStrCat(R"(component ")"_s, fullName,
" has unknown type "_s, type, R"(" has unknown type ")"_s, type,
" and was not imported"_s)); R"(" and was not imported)"_s));
} }
if (target) { if (target) {