| 277 | } |
| 278 | |
| 279 | void 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 | |
| 299 | cmBTStringRange cmMakefile::GetIncludeDirectoriesEntries() const |
| 300 | { |
no test coverage detected