| 964 | } |
| 965 | |
| 966 | void 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 | } |
no test coverage detected