cmake_minimum_required()
cmake_minimum_required
Set the minimum required version of cmake for a project and update Policy Settings to match the version given:
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.
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.
Note
Call the cmake_minimum_required()
command at the beginning of the top-level CMakeLists.txt
file even before calling the 登录查看完整内容