| 258 | } |
| 259 | |
| 260 | void 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 | |
| 279 | void cmMakefile::MaybeWarnCMP0144(std::string const& rootVar, cmValue rootDef, |
| 280 | cm::optional<std::string> const& rootEnv) |
no test coverage detected