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

Method IssueCMP0095Warning

Source/cmInstallTargetGenerator.cxx:966–987  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

964}
965
966void cmInstallTargetGenerator::IssueCMP0095Warning(
967 std::string const& unescapedRpath)
968{
969 // Reduce warning noise to cases where used RPATHs may actually be affected
970 // by CMP0095. This filter is meant to skip warnings in cases when
971 // non-curly-braces syntax (e.g. $ORIGIN) or no keyword is used which has
972 // worked already before CMP0095. We intend to issue a warning in all cases
973 // with curly-braces syntax, even if the workaround of double-escaping is in
974 // place, since we deprecate the need for it with CMP0095.
975 bool const potentially_affected(unescapedRpath.find("${") !=
976 std::string::npos);
977
978 if (potentially_affected) {
979 std::ostringstream w;
980 w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0095) << "\n";
981 w << "RPATH entries for target '" << this->Target->GetName() << "' "
982 << "will not be escaped in the intermediary "
983 << "cmake_install.cmake script.";
984 this->Target->GetGlobalGenerator()->GetCMakeInstance()->IssueMessage(
985 MessageType::AUTHOR_WARNING, w.str(), this->GetBacktrace());
986 }
987}

Callers 1

AddChrpathPatchRuleMethod · 0.95

Calls 7

strMethod · 0.80
findMethod · 0.45
GetNameMethod · 0.45
IssueMessageMethod · 0.45
GetCMakeInstanceMethod · 0.45
GetGlobalGeneratorMethod · 0.45
GetBacktraceMethod · 0.45

Tested by

no test coverage detected