CMake命令的选项

时间:2013-06-07 15:13:53

标签: cmake gfortran

cmake_minimum_required命令的documentation说:

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.   

但是,它没有说明FATAL_ERROR的有效选项是什么 - 我错过了一些令人目眩的明显事物吗?

1 个答案:

答案 0 :(得分:0)

FATAL_ERROR的上下文中,cmake_minimum_required不需要其他参数。

你这样使用它:

cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

cmake_minimum_required(VERSION 2.8.11.1 FATAL_ERROR)

message的上下文中,您执行传递一个额外的参数:

message(FATAL_ERROR "My message...")
相关问题