Replies: 1 comment 2 replies
-
当初找父目录,是为了实现跟 git 类似的行为,在子目录下执行 xmake 也能正常编译而已,只是实现上,仅仅只是简单的做了 向上查找,没做 includes 关联路径识别。 另外,也能避免用户随处敲 xmake ,到处生成 .xmake 目录 不过,如果这个特性用户都不喜欢的话,也可以考虑在 3.0 去掉。。可以搞个投票。 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
目前在子目录运行
xmake
时会找父目录xmake.lua然后在父目录存储.xmake
缓存,而运行xmake -P ..
则是在当前目录缓存.xmake
。后者行为可以理解,因为需要在不同文件夹保存不同config的信息避免切换时重新编译,但前一行为是为什么应用场景设计的呢?目前看平常工作中用不到这个特性,反而是导致了新手的很多问题,例如在用户文件夹不小心运行了xmake并回车生成了xmake.lua,这样用户文件夹下的所有其他xmake项目都跑不了,安装xmake-repo中使用xmake安装的包也会安装失败(packages位于用户文件夹下)。如果是为了前向兼容,是否考虑在3.0中更改这一默认行为?例如,改成xmake -P .
但当父目录有xmake.lua时发warning You are inside xmake project at "path", runxmake -P <path>
to build main projectBeta Was this translation helpful? Give feedback.
All reactions