本文介绍了cmake的全局默认设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有与cmakeMAKEFLAGS环境变量类似的东西,以设置某些诸如CMAKE_INSTALL_PREFIX的全局默认值?

Is there anything similar to MAKEFLAGS environment variable for cmake, to set some global defaults like CMAKE_INSTALL_PREFIX?

推荐答案

否,CMake没有类似的环境变量.您可以在此处此处记录通过CMake中的环境变量可以设置的所有内容. .

No, there is no similar environment variable for CMake. Everything you can set through environment variables in CMake is documented here.

但是您可以使用预加载缓存" -C选项,然后将所有重复出现的设置放在适当的脚本中(请参见例如 CMake预加载脚本缓存).

But you could use a the "preload cache" -C option and put all reoccurring settings in an appropriate script (see e.g. CMake preload script for cache).

这篇关于cmake的全局默认设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-28 02:54