diff options
author | Brad King <brad.king@kitware.com> | 2009-10-02 18:36:47 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-10-02 18:36:47 (GMT) |
commit | 3d3efbd3f50cf1acbbda1a8d07d53874f2388842 (patch) | |
tree | beb6ebc6f5920b0b240a87897a67edb40df2fd47 /Source/cmIfCommand.cxx | |
parent | 5837f4a613254ac578b957405a0af87a9473a676 (diff) | |
download | CMake-3d3efbd3f50cf1acbbda1a8d07d53874f2388842.zip CMake-3d3efbd3f50cf1acbbda1a8d07d53874f2388842.tar.gz CMake-3d3efbd3f50cf1acbbda1a8d07d53874f2388842.tar.bz2 |
Clarify documentation and message for CMP0012
This commit re-words the warning message produced for CMP0012 to avoid
the word 'you' since often the person reading the message is not the
author of the code. We also add an example of the bad OLD behavior to
the policy documentation.
Diffstat (limited to 'Source/cmIfCommand.cxx')
-rw-r--r-- | Source/cmIfCommand.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index 81be212..b51fabb 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -269,10 +269,9 @@ namespace if (cmSystemTools::IsOff(def)) { cmPolicies* policies = makefile->GetPolicies(); - errorString = "You have used a variable or argument named \"" + errorString = "A variable or argument named \"" + newArg - + "\" in a conditional statement. Please be aware of issues " - + "related to policy CMP0012. " + + "\" appears in a conditional statement. " + policies->GetPolicyWarning(cmPolicies::CMP0012); status = cmake::AUTHOR_WARNING; } @@ -285,10 +284,9 @@ namespace if (!cmSystemTools::IsOff(def)) { cmPolicies* policies = makefile->GetPolicies(); - errorString = "You have used a variable or argument named \"" + errorString = "A variable or argument named \"" + newArg - + "\" in a conditional statement. Please be aware of issues " - + "related to policy CMP0012. " + + "\" appears in a conditional statement. " + policies->GetPolicyWarning(cmPolicies::CMP0012); status = cmake::AUTHOR_WARNING; } |