We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
v2.8.6
Windows 11 24H2
// a.cpp int main() {} // b.cpp int main() {}
target("test") add_files("a.cpp") add_tests("test", {files = "b.cpp", remove_files = "a.cpp"})
-- xmake.lua xmake f xmake build xmake project -k compile_commands --lsp=clangd
// compile_commands.json [{ "directory": "C:\\Users\\22835\\Desktop\\test", "arguments": ["clang.exe", "-c", "-Qunused-arguments", "-m64", "-fexceptions", "-fcxx-exceptions", "-o", "build\\.objs\\test\\windows\\x64\\release\\a.cpp.obj", "a.cpp"], "file": "a.cpp" }]
可以看到没有为测试用例也就是b.cpp生成配置信息
b.cpp
需要根据add_tests中的配置为测试用例生成compile commands
add_tests
-- xmake.lua target("test") add_files("a.cpp") add_tests("test", {files = "b.cpp", remove_files = "a.cpp"})
xmake project -k compile_commands --lsp=clangd -vD configure { arch = x64 toolchain = clang buildir = build ndk_stdcxx = true kind = static ccache = true plat = windows mode = release host = windows } create ok!
The text was updated successfully, but these errors were encountered:
Bot detected the issue body's language is not English, translate it automatically.
Title: xmake cannot generate compile commands for test
Sorry, something went wrong.
这个问题在xmake v2.9.4+HEAD.e85b001f1中依然存在,应该也为测试用例生成compile_commands。
xmake v2.9.4+HEAD.e85b001f1
This problem still exists in xmake v2.9.4+HEAD.e85b001f1, which should also generate compile_commands for test cases.
No branches or pull requests
Xmake 版本
v2.8.6
操作系统版本和架构
Windows 11 24H2
描述问题
源代码
命令
结果
可以看到没有为测试用例也就是
b.cpp
生成配置信息期待的结果
需要根据
add_tests
中的配置为测试用例生成compile commands工程配置
附加信息和错误日志
The text was updated successfully, but these errors were encountered: