[Cmake-commits] [cmake-commits] king committed cmIfCommand.cxx 1.98 1.99 cmPolicies.cxx 1.47 1.48

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Oct 2 14:36:49 EDT 2009


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv27218/Source

Modified Files:
	cmIfCommand.cxx cmPolicies.cxx 
Log Message:
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.


Index: cmPolicies.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmPolicies.cxx,v
retrieving revision 1.47
retrieving revision 1.48
diff -C 2 -d -r1.47 -r1.48
*** cmPolicies.cxx	2 Oct 2009 18:04:57 -0000	1.47
--- cmPolicies.cxx	2 Oct 2009 18:36:47 -0000	1.48
***************
*** 363,367 ****
      "and 1. Other boolean constants such as true, false, yes, no, "
      "on, off, y, n, notfound, ignore (all case insensitive) were recognized "
!     "in some cases but not all. In later versions of cmake these values are "
      "treated as boolean constants more consistently and should not be used "
      "as variable names. "
--- 363,369 ----
      "and 1. Other boolean constants such as true, false, yes, no, "
      "on, off, y, n, notfound, ignore (all case insensitive) were recognized "
!     "in some cases but not all.  "
!     "For example, the code \"if(TRUE)\" might have evaluated as false.  "
!     "In later versions of cmake these values are "
      "treated as boolean constants more consistently and should not be used "
      "as variable names. "

Index: cmIfCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmIfCommand.cxx,v
retrieving revision 1.98
retrieving revision 1.99
diff -C 2 -d -r1.98 -r1.99
*** cmIfCommand.cxx	28 Sep 2009 15:42:45 -0000	1.98
--- cmIfCommand.cxx	2 Oct 2009 18:36:47 -0000	1.99
***************
*** 270,277 ****
          {
          cmPolicies* policies = makefile->GetPolicies();
!         errorString = "You have used a variable or argument named \""
            + newArg
!           + "\" in a conditional statement. Please be aware of issues "
!           + "related to policy CMP0012. "
            + policies->GetPolicyWarning(cmPolicies::CMP0012);
          status = cmake::AUTHOR_WARNING;
--- 270,276 ----
          {
          cmPolicies* policies = makefile->GetPolicies();
!         errorString = "A variable or argument named \""
            + newArg
!           + "\" appears in a conditional statement.  "
            + policies->GetPolicyWarning(cmPolicies::CMP0012);
          status = cmake::AUTHOR_WARNING;
***************
*** 286,293 ****
          {
          cmPolicies* policies = makefile->GetPolicies();
!         errorString = "You have used a variable or argument named \""
            + newArg
!           + "\" in a conditional statement. Please be aware of issues "
!           + "related to policy CMP0012. "
            + policies->GetPolicyWarning(cmPolicies::CMP0012);
          status = cmake::AUTHOR_WARNING;
--- 285,291 ----
          {
          cmPolicies* policies = makefile->GetPolicies();
!         errorString = "A variable or argument named \""
            + newArg
!           + "\" appears in a conditional statement.  "
            + policies->GetPolicyWarning(cmPolicies::CMP0012);
          status = cmake::AUTHOR_WARNING;



More information about the Cmake-commits mailing list