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

Method MaybeWarnCMP0144

Source/cmMakefile.cxx:279–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277}
278
279void cmMakefile::MaybeWarnCMP0144(std::string const& rootVar, cmValue rootDef,
280 cm::optional<std::string> const& rootEnv)
281{
282 // Warn if a <PACKAGENAME>_ROOT variable we may use is set.
283 if ((rootDef || rootEnv) && this->WarnedCMP0144.insert(rootVar).second) {
284 auto e = cmStrCat(cmPolicies::GetPolicyWarning(cmPolicies::CMP0144), '\n');
285 if (rootDef) {
286 e += cmStrCat("CMake variable ", rootVar, " is set to:\n ", *rootDef,
287 '\n');
288 }
289 if (rootEnv) {
290 e += cmStrCat("Environment variable ", rootVar, " is set to:\n ",
291 *rootEnv, '\n');
292 }
293 e += "For compatibility, find_package is ignoring the variable, but "
294 "code in a .cmake module might still use it.";
295 this->IssueMessage(MessageType::AUTHOR_WARNING, e);
296 }
297}
298
299cmBTStringRange cmMakefile::GetIncludeDirectoriesEntries() const
300{

Callers 1

Calls 3

IssueMessageMethod · 0.95
cmStrCatFunction · 0.70
insertMethod · 0.45

Tested by

no test coverage detected