I'd like to add a variable that the user must set after clicking "Configure" in cmake-gui. Is there a way to do this?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Using the set command, specify CACHE parameters, e.g.
set(NAME_INCLUDE "default value" CACHE FILEPATH "description")
set(NAME_LIB "default value" CACHE FILEPATH "description")
In the GUI CMake will group all variables with the same prefix.
See the CMake documentation for set.