Comments (6)
Bot detected the issue body's language is not English, translate it automatically.
Title: plugin.compile_commands.autoupdate does not carry precompiled header information
from xmake.
Bot detected the issue body's language is not English, translate it automatically.
At present, it is found that the vscode plug-in behaves normally when it directly calls compile_commands.lua, but the independent startup process behaves abnormally.
from xmake.
经过逆向,看起来是 XMAKE_GENERATOR_COMPDB_LSP 这个环境变量的问题,模仿vscode插件内写法:
os.setenv("XMAKE_GENERATOR_COMPDB_LSP", "clangd")
config.load()
_config_targets()
compile_commands.make(compileCommandsDirectory or ".vscode")
就会正确输出pch结果
from xmake.
Bot detected the issue body's language is not English, translate it automatically.
After reverse engineering, it seems that the problem is the XMAKE_GENERATOR_COMPDB_LSP environment variable, which imitates the writing method in the vscode plug-in:
os.setenv("XMAKE_GENERATOR_COMPDB_LSP", "clangd")
config.load()
_config_targets()
compile_commands.make(compileCommandsDirectory or ".vscode")
The pch result will be output correctly.
from xmake.
配置下 lsp 到 clangd 就行了,因为目前已知的,就 clangd 支持 pch,其他的暂时没测试验证过,所以暂时禁用了 pch
add_rules("plugin.compile_commands.autoupdate", { lsp = "clangd", outputdir = ".vscode" })
from xmake.
Bot detected the issue body's language is not English, translate it automatically.
Just configure lsp to clangd, because as far as is known, only clangd supports pch, and the others have not been tested and verified, so pch is temporarily disabled.
add_rules("plugin.compile_commands.autoupdate", { lsp = "clangd", outputdir = ".vscode" })
from xmake.
Related Issues (20)
- 安装 Nimble 依赖包报错:fetch nimble::xxx failed! HOT 1
- 交叉编译环境中,Qt找不到uic HOT 10
- Native XCode project generator plugin
- Module object files are not built since v2.8.7 HOT 4
- 添加 target:gb2312 以满足中文兼容性 HOT 5
- 增加能够在 rule 中传递的用户级自定义变量的功能 HOT 5
- 创建 cmakelist 异常 HOT 5
- Support range based glob pattern HOT 5
- add_requireconfs 固定依赖版本后丢失依赖信息 HOT 21
- flex应该能正常单独使用 HOT 3
- package budil with android ndk use cmake_generator=Ninja failed on windows HOT 2
- in package config setting "-DANDROID_PLATFORM=XXX" is override by xmake ndk toolchain HOT 1
- 大型项目用 xmake 构建的最佳实践? HOT 10
- ubuntu下调用xmake f --menu报错error: field 'isdone' is not callable (a nil value) HOT 7
- Allow target:fileconfig() for headerfiles HOT 8
- new version xmake can not build static lib only containing modules HOT 7
- package:add_linkdirs() 未导出 HOT 11
- xmake中如何添加配置g++ -Wl,-rpath=. HOT 2
- Dependencies are built after precompiled headers HOT 3
- Endianness/Byte-order detection on build machine HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xmake.