Closed xq114 closed 2 months ago
Bot detected the issue body's language is not English, translate it automatically.
In what scenario do you need this feature?
Currently, the intermediate directory structure generated by xmake is unified in the form of plat/arch/mode, such as .deps/
Add an API to set the intermediate directory structure; it is best to specify it in the on_config script field, which can achieve some more complex operations, such as calculating a hash as an intermediate directory based on all configs
No response
No response
加了个 build.intermediate_directory
policy,可以禁用生成中间目录。set_policy("build.intermediate_directory", false)
https://github.com/xmake-io/xmake/pull/5283
然后,你直接 set_targetdir/set_objectdir/set_dependir
设置就行了。。但只能在 on_load 里面改,on_config 不行,太滞后
你在什么场景下需要该功能?
目前xmake生成的中间目录结构统一为plat/arch/mode形式,例如.deps//windows/x64/release/...。目录结构的用途是区分config不让不同config的文件混在一起,然而实际上固定的目录结构并不能达成这一目标(很多时候plat/arch/mode都是定死的,产生区别的是其他config),需要灵活指定中间目录结构。
描述可能的解决方案
增加一个api设置中间目录结构;最好可以在on_config脚本域指定,这样可以实现一些复杂一点的操作,例如根据所有config计算一个hash作为中间目录
描述你认为的候选方案
No response
其他信息
No response