CMP0048.rst 1.1 KB

123456789101112131415161718192021222324
  1. CMP0048
  2. -------
  3. The :command:`project` command manages ``VERSION`` variables.
  4. CMake version 3.0 introduced the ``VERSION`` option of the :command:`project`
  5. command to specify a project version as well as the name. In order to keep
  6. :variable:`PROJECT_VERSION` and related variables consistent with variable
  7. :variable:`PROJECT_NAME` it is necessary to set the ``VERSION`` variables
  8. to the empty string when no ``VERSION`` is given to :command:`project`.
  9. However, this can change behavior for existing projects that set ``VERSION``
  10. variables themselves since :command:`project` may now clear them.
  11. This policy controls the behavior for compatibility with such projects.
  12. The ``OLD`` behavior for this policy is to leave ``VERSION`` variables untouched.
  13. The ``NEW`` behavior for this policy is to set ``VERSION`` as documented by the
  14. :command:`project` command.
  15. This policy was introduced in CMake version 3.0.
  16. CMake version |release| warns when the policy is not set and uses
  17. ``OLD`` behavior. Use the :command:`cmake_policy` command to set
  18. it to ``OLD`` or ``NEW`` explicitly.
  19. .. include:: DEPRECATED.txt