CMP0125.rst 1.1 KB

12345678910111213141516171819202122232425
  1. CMP0125
  2. -------
  3. .. versionadded:: 3.21
  4. The :command:`find_file`, :command:`find_path`, :command:`find_library` and
  5. :command:`find_program` commands handle cache variables in the same way
  6. regardless of whether they are defined on the command line, with or without a
  7. type, or using the :command:`set` command.
  8. Starting with CMake 3.21, the :command:`find_file`, :command:`find_path`,
  9. :command:`find_library`, and :command:`find_program` commands ensure that the
  10. cache variables will be used in the same way regardless how they were defined
  11. and the result will be always successful if the searched artifact exists.
  12. The ``OLD`` behavior for this policy is to have the find commands' behaviors
  13. differ depending on how the cache variable is defined. The ``NEW`` behavior for
  14. this policy is to have consistent behavior.
  15. This policy was introduced in CMake version 3.21. Use the
  16. :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
  17. Unlike many policies, CMake version |release| does *not* warn when the policy
  18. is not set and simply uses ``OLD`` behavior.
  19. .. include:: DEPRECATED.txt