cmake_minimum_required.rst 871 B

123456789101112131415161718192021222324252627282930
  1. cmake_minimum_required
  2. ----------------------
  3. Set the minimum required version of cmake for a project.
  4. ::
  5. cmake_minimum_required(VERSION major[.minor[.patch[.tweak]]]
  6. [FATAL_ERROR])
  7. If the current version of CMake is lower than that required it will
  8. stop processing the project and report an error. When a version
  9. higher than 2.4 is specified the command implicitly invokes
  10. ::
  11. cmake_policy(VERSION major[.minor[.patch[.tweak]]])
  12. which sets the cmake policy version level to the version specified.
  13. When version 2.4 or lower is given the command implicitly invokes
  14. ::
  15. cmake_policy(VERSION 2.4)
  16. which enables compatibility features for CMake 2.4 and lower.
  17. The FATAL_ERROR option is accepted but ignored by CMake 2.6 and
  18. higher. It should be specified so CMake versions 2.4 and lower fail
  19. with an error instead of just a warning.