CMP0000.rst 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. CMP0000
  2. -------
  3. A minimum required CMake version must be specified.
  4. CMake requires that projects specify the version of CMake to which
  5. they have been written. This policy has been put in place so users
  6. trying to build the project may be told when they need to update their
  7. CMake. Specifying a version also helps the project build with CMake
  8. versions newer than that specified. Use the cmake_minimum_required
  9. command at the top of your main CMakeLists.txt file:
  10. ::
  11. cmake_minimum_required(VERSION <major>.<minor>)
  12. where "<major>.<minor>" is the version of CMake you want to support
  13. (such as "2.6"). The command will ensure that at least the given
  14. version of CMake is running and help newer versions be compatible with
  15. the project. See documentation of cmake_minimum_required for details.
  16. Note that the command invocation must appear in the CMakeLists.txt
  17. file itself; a call in an included file is not sufficient. However,
  18. the cmake_policy command may be called to set policy CMP0000 to OLD or
  19. NEW behavior explicitly. The OLD behavior is to silently ignore the
  20. missing invocation. The NEW behavior is to issue an error instead of
  21. a warning. An included file may set CMP0000 explicitly to affect how
  22. this policy is enforced for the main CMakeLists.txt file.
  23. This policy was introduced in CMake version 2.6.0.
  24. .. include:: DEPRECATED.txt