开发者

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

开发者 https://www.devze.com 2023-04-02 09:44 出处:网络
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.

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

精彩评论

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