diff options
author | Brad King <brad.king@kitware.com> | 2008-03-05 23:42:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-03-05 23:42:46 (GMT) |
commit | c07aba6240f59b885a8524a6bafaf26e0e78804c (patch) | |
tree | 595fd1669a86d25555fe954c3e48edbf0805cf00 /Source/cmPolicies.cxx | |
parent | 49549560b2ecdb4cf1c3aa155c3dccd4688a8de7 (diff) | |
download | CMake-c07aba6240f59b885a8524a6bafaf26e0e78804c.zip CMake-c07aba6240f59b885a8524a6bafaf26e0e78804c.tar.gz CMake-c07aba6240f59b885a8524a6bafaf26e0e78804c.tar.bz2 |
ENH: Fix policy warning message to not give wrong code as example.
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r-- | Source/cmPolicies.cxx | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 44714a1..3e9373b 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -362,19 +362,14 @@ std::string cmPolicies::GetPolicyWarning(cmPolicies::PolicyID id) return "Request for warning text for undefined policy!"; } - cmOStringStream error; - error << - "Warning " << - pos->second->IDString << ": " << - pos->second->ShortDescription << - " You can suppress this warning by adding either\n" << - "cmake_policy (OLD " << - pos->second->IDString << ") for the old behavior or " << - "cmake_policy(NEW " << - pos->second->IDString << ") for the new behavior. " << - "Run cmake --help-policy " << - pos->second->IDString << " for more information."; - return error.str(); + cmOStringStream msg; + msg << + "WARNING: Policy " << pos->second->IDString << " is not set: " + "" << pos->second->ShortDescription << "\n" + "Run \"cmake --help-policy " << pos->second->IDString << "\" for " + "policy details. Use the cmake_policy command to set the policy " + "and suppress this warning."; + return msg.str(); } |