Is there anything similar to MAKEFLAGS
environment variable for cmake
, to set some global defaults like CMAKE_INSTALL_PREFIX
?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
No, there is no similar environment variable for CMake. Everything you can set through environment variables in CMake is documented here.
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).