CMP0130.rst 925 B

1234567891011121314151617181920212223242526272829303132
  1. CMP0130
  2. -------
  3. .. versionadded:: 3.24
  4. :command:`while` diagnoses condition evaluation errors.
  5. CMake 3.23 and below accidentally tolerated errors encountered while
  6. evaluating the condition passed to the :command:`while` command
  7. (but not the :command:`if` command). For example, the code
  8. .. code-block:: cmake
  9. set(paren "(")
  10. while(${paren})
  11. endwhile()
  12. creates an unbalanced parenthesis during condition evaluation.
  13. CMake 3.24 and above prefer to diagnose such errors. This policy
  14. provides compatibility for projects that have not been updated to
  15. fix their condition errors.
  16. The ``OLD`` behavior for this policy is to ignore errors in
  17. :command:`while` conditions. The ``NEW`` behavior for this
  18. policy is to diagnose errors in :command:`while` conditions.
  19. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.24
  20. .. |WARNS_OR_DOES_NOT_WARN| replace:: warns
  21. .. include:: STANDARD_ADVICE.txt
  22. .. include:: DEPRECATED.txt