-
-
Notifications
You must be signed in to change notification settings - Fork 784
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
.xmake directory always appears next to xmake.lua #5439
Labels
Comments
see #3342
|
It works for me. ruki:test ruki$ tree .
.
├── build
│ └── xmake.lua
├── out
└── src
└── main.cpp
3 directories, 2 files
ruki:test ruki$ ls -a ./build/
. .. xmake.lua
ruki:test ruki$ ls -a ./
. .. .gitignore build out src
ruki:test ruki$ cd out/
ruki:out ruki$ xmake f -P ../build/
checking for platform ... macosx
checking for architecture ... x86_64
checking for Xcode directory ... /Applications/Xcode.app
checking for SDK version of Xcode for macosx (x86_64) ... 14.0
checking for Minimal target version of Xcode for macosx (x86_64) ... 14.0
ruki:out ruki$ xmake
[ 50%]: cache compiling.release ../src/main.cpp
[ 75%]: linking.release test
[100%]: build ok, spent 1.283s
ruki:out ruki$ ls -a ../build/
. .. xmake.lua
ruki:out ruki$ ls -a ../
. .. .gitignore build out src
ruki:out ruki$ ls -a .
. .. .xmake build |
Are you running on mac? My system is windows. I don't think I understand the justification "it works for me" when the example you gave would be on a different OS. It does not work on windows. It is generating the erroneous .xmake next to xmake.lua |
It still works for me on windows. PS C:\Users\wangrunqing\Downloads\tst> dir .
目录: C:\Users\wangrunqing\Downloads\tst
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2024/8/7 12:12 build
d----- 2024/8/7 12:21 out
d----- 2024/8/7 12:08 src
-a---- 2024/3/25 9:42 64 .gitignore
PS C:\Users\wangrunqing\Downloads\tst> dir .\build
目录: C:\Users\wangrunqing\Downloads\tst\build
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2024/8/7 12:09 1964 xmake.lua
PS C:\Users\wangrunqing\Downloads\tst> dir .\out
PS C:\Users\wangrunqing\Downloads\tst> cd out
PS C:\Users\wangrunqing\Downloads\tst\out> xmake f -P ..\build
checking for platform ... windows
checking for architecture ... x64
checking for Microsoft Visual Studio (x64) version ... 2022
checking for Microsoft C/C++ Compiler (x64) version ... 19.41.33923
PS C:\Users\wangrunqing\Downloads\tst\out> xmake
[ 50%]: compiling.release ..\src\main.cpp
[ 75%]: linking.release tst.exe
[100%]: build ok, spent 1.125s
PS C:\Users\wangrunqing\Downloads\tst\out> dir ..\build
目录: C:\Users\wangrunqing\Downloads\tst\build
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2024/8/7 12:09 1964 xmake.lua
PS C:\Users\wangrunqing\Downloads\tst\out> dir .
目录: C:\Users\wangrunqing\Downloads\tst\out
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2024/8/7 12:21 .xmake
d----- 2024/8/7 12:21 build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Xmake Version
2.9.4
Operating System Version and Architecture
Windows 10
Describe Bug
No matter what I seem to do, an .xmake directory always appears next to the xmake.lua file, regardless of the current working directory.
Expected Behavior
cd target_dir
xmake -P ../build
I am expecting all outputs generated by xmake to be within target_dir. It places a .xmake directory inside of target_dir AND inside of ../build directory where xmake.lua is. I do not want the scripts directory polluted in this example.
This seems to do with AppData/temp/xmake directory. This directory seems to store invocation dates for a particular xmake execution on the specified folder. After the first run, if you delete .xmake within ../build, .xmake directory will not appear again within ../build. However, if you delete the generated data within AppData/temp/xmake directory, the next xmake invocation generates .xmake within ../build.
I do not want any outputs generated within ../build (this example)
Project Configuration
toolchain("myclang")
set_toolset("cc", "clang")
set_toolset("ld", "clang")
toolchain_end()
set_config("plat", "cross")
set_toolchains("myclang")
target("test")
set_kind("binary")
add_files("../src/*.c")
Additional Information and Error Logs
The text was updated successfully, but these errors were encountered: