ENH: Fix policy warning message to not give wrong code as example.
This commit is contained in:
parent
49549560b2
commit
c07aba6240
|
@ -362,19 +362,14 @@ std::string cmPolicies::GetPolicyWarning(cmPolicies::PolicyID id)
|
||||||
return "Request for warning text for undefined policy!";
|
return "Request for warning text for undefined policy!";
|
||||||
}
|
}
|
||||||
|
|
||||||
cmOStringStream error;
|
cmOStringStream msg;
|
||||||
error <<
|
msg <<
|
||||||
"Warning " <<
|
"WARNING: Policy " << pos->second->IDString << " is not set: "
|
||||||
pos->second->IDString << ": " <<
|
"" << pos->second->ShortDescription << "\n"
|
||||||
pos->second->ShortDescription <<
|
"Run \"cmake --help-policy " << pos->second->IDString << "\" for "
|
||||||
" You can suppress this warning by adding either\n" <<
|
"policy details. Use the cmake_policy command to set the policy "
|
||||||
"cmake_policy (OLD " <<
|
"and suppress this warning.";
|
||||||
pos->second->IDString << ") for the old behavior or " <<
|
return msg.str();
|
||||||
"cmake_policy(NEW " <<
|
|
||||||
pos->second->IDString << ") for the new behavior. " <<
|
|
||||||
"Run cmake --help-policy " <<
|
|
||||||
pos->second->IDString << " for more information.";
|
|
||||||
return error.str();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue