开发者

How do I add a configuration variable to my CMake script?

I'd like to add a variable that the us开发者_运维技巧er must set after clicking "Configure" in cmake-gui. Is there a way to do this?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜