-
我在计划将xmake移植到一个可裁剪的操作系统上,原有的操作系统是采用kconfig生成config.h的形式,在对于难以修改为option的kconfig,有什么办法能直接使用或其它解决办法?中,我了解到可以使用option代替kconfig,在option中,我采用以下方式: option("USING_USER_MAIN")
set_default(true)
set_showmenu(true)
add_defines("USING_USER_MAIN") 此方式是在编译时自动加上 -DUSING_USER_MAIN,在少数宏时比较好使,但是如果有大量宏时,不仅难以观察,过长的命令行也会引起编译报错。 之后我又留意到 set_configvar 参数,但是此方式就需要维护两份文件了,一份option,一份模板文件。那么是否存在一种方式,能够直接将option转为头文件呢 |
Beta Was this translation helpful? Give feedback.
Answered by
waruqi
Nov 9, 2022
Replies: 1 comment 3 replies
-
add_configfiles + set_configvar 或者 https://xmake.io/#/zh-cn/manual/helper_interfaces 可以不用 option |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
xqyjlj
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
add_configfiles + set_configvar 或者 https://xmake.io/#/zh-cn/manual/helper_interfaces
可以不用 option