-
-
Notifications
You must be signed in to change notification settings - Fork 816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
target:add_configfiles 需要一个重新生成的缓存策略 #4747
Comments
Title: target:add_configfiles requires a regenerated cache policy In what scenario do you need this feature?Using the add_configfiles function For example, there is a config.h.in file, which contains built-in variables such as ${GIT_BRANCH} ${GIT_COMMIT}. It can be replaced with config.h normally during construction. After git submission, branch and commit have changed, but the xmake build command is executed directly and config.h is not regenerated. Describe possible solutionsIt is expected that every time git version branch commit changes, it can be automatically detected and trigger the automatic regeneration of configfiles. Describe your alternativesProvide an interface similar to set_policy("build.ccache", false) other informationNo response |
试下 |
感谢提示! 另外,我注意到目前文档中 https://xmake.io/#/guide/build_policies |
更新了 |
updated |
你在什么场景下需要该功能?
使用 add_configfiles 功能
例如有 config.h.in 文件,内有使用 ${GIT_BRANCH} ${GIT_COMMIT} 等内置变量,构建时可以正常替换为 config.h
在经历 git 提交后,branch和 commit 发生了改变,但是直接执行 xmake build 命令,并没有重新生成 config.h
描述可能的解决方案
期望在每次 git version branch commit 改变后,能够自动检测到,并触发 configfiles 的自动重新生成
描述你认为的候选方案
提供类似 set_policy("build.ccache", false) 的接口
例如:
add_configfiles("config.h.in", {cache = false})
其他信息
No response
The text was updated successfully, but these errors were encountered: