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
2.7.4
Windows 11 Verison 22H2 Build 25272
在 2.7.4 版本下,xmake 生成 compile_commands.json 时,如果编译器路径带有空格,会进行拆分,例如:
compile_commands.json
[ { "directory": "C:\\Users\\ROG\\Documents\\Code\\graphics\\thss-animation-collision-detect", "arguments": [ "C:\\Program", "Files\\NVIDIA", "GPU", "Computing", "Toolkit\\CUDA\\v12.0\\bin\\nvcc.exe", "-c", "-O3", ...
这造成 clangd 无法正确识别 compile_commands.json,表现为提示找不到任何 xmake 添加的第三方包 includes。
将路径重新组合后,问题解决:
[ { "directory": "C:\\Users\\ROG\\Documents\\Code\\graphics\\thss-animation-collision-detect", "arguments": [ "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.0\\bin\\nvcc.exe", "-c", "-O3", ...
clangd 正确识别 compile_commands.json。
add_rules("mode.debug", "mode.release") add_requires("fmt", "glad ^0.1.34", "glfw ^3.3.4", "glm ^0.9.9", "spdlog", "stb", "imgui-docking", "range-v3") add_cxxflags("-Wall") if is_mode("release") then set_optimize("fastest") end if is_mode("debug") then add_cxxflags("-DDEBUG") add_cuflags("-DDEBUG") end set_languages("cxx20") target("test") before_run(function (target) os.exec("xmake build") end) set_kind("binary") add_files("src/**.cu") add_files("src/**.cpp|algs/test.cpp") add_packages("fmt", "glad", "glfw", "glm", "spdlog", "stb", "imgui-docking", "range-v3") set_rundir('$(projectdir)') add_cuflags("-rdc=true") add_cuflags("--expt-relaxed-constexpr") add_cuflags("--extended-lambda") add_cugencodes("native")
No response
The text was updated successfully, but these errors were encountered:
或许与 #3159 有关
Sorry, something went wrong.
看下 #3242 #3203
可以了,非常感谢!
No branches or pull requests
Xmake 版本
2.7.4
操作系统版本和架构
Windows 11 Verison 22H2 Build 25272
描述问题
在 2.7.4 版本下,xmake 生成
compile_commands.json
时,如果编译器路径带有空格,会进行拆分,例如:这造成 clangd 无法正确识别
compile_commands.json
,表现为提示找不到任何 xmake 添加的第三方包 includes。将路径重新组合后,问题解决:
期待的结果
clangd 正确识别
compile_commands.json
。工程配置
附加信息和错误日志
No response
The text was updated successfully, but these errors were encountered: