File: cmake_minimum_required.rst

package info (click to toggle)
cmake 3.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 44,040 kB
  • sloc: cpp: 160,392; ansic: 149,082; yacc: 3,254; sh: 2,825; xml: 2,427; lex: 1,234; python: 449; lisp: 267; objc: 134; f90: 105; fortran: 101; perl: 99; makefile: 71; tcl: 55; asm: 28; php: 25; ruby: 22; java: 20
file content (30 lines) | stat: -rw-r--r-- 871 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
cmake_minimum_required
----------------------

Set the minimum required version of cmake for a project.

::

  cmake_minimum_required(VERSION major[.minor[.patch[.tweak]]]
                         [FATAL_ERROR])

If the current version of CMake is lower than that required it will
stop processing the project and report an error.  When a version
higher than 2.4 is specified the command implicitly invokes

::

  cmake_policy(VERSION major[.minor[.patch[.tweak]]])

which sets the cmake policy version level to the version specified.
When version 2.4 or lower is given the command implicitly invokes

::

  cmake_policy(VERSION 2.4)

which enables compatibility features for CMake 2.4 and lower.

The FATAL_ERROR option is accepted but ignored by CMake 2.6 and
higher.  It should be specified so CMake versions 2.4 and lower fail
with an error instead of just a warning.