MCPcopy Create free account
hub / github.com/Kitware/CMake / MaybeWarnCMP0074

Method MaybeWarnCMP0074

Source/cmMakefile.cxx:260–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260void cmMakefile::MaybeWarnCMP0074(std::string const& rootVar, cmValue rootDef,
261 cm::optional<std::string> const& rootEnv)
262{
263 // Warn if a <PackageName>_ROOT variable we may use is set.
264 if ((rootDef || rootEnv) && this->WarnedCMP0074.insert(rootVar).second) {
265 auto e = cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0074), '\n');
266 if (rootDef) {
267 e += cmStrCat("CMake variable ", rootVar, " is set to:\n ", *rootDef,
268 '\n');
269 }
270 if (rootEnv) {
271 e += cmStrCat("Environment variable ", rootVar, " is set to:\n ",
272 *rootEnv, '\n');
273 }
274 e += "For compatibility, CMake is ignoring the variable.";
275 this->IssueMessage(MessageType::AUTHOR_WARNING, e);
276 }
277}
278
279void cmMakefile::MaybeWarnCMP0144(std::string const& rootVar, cmValue rootDef,
280 cm::optional<std::string> const& rootEnv)

Callers 1

Calls 3

IssueMessageMethod · 0.95
cmStrCatFunction · 0.70
insertMethod · 0.45

Tested by

no test coverage detected