Open paul-reilly opened 1 year ago
It works for me on ubuntu.
[
{
"directory": "/tmp/test",
"arguments": ["/usr/bin/gcc", "-c", "-m64", "-fvisibility=hidden", "-fvisibility-inlines-hidden", "-O3", "-std=c++11", "-I/tmp/test/build/.gens/qtcc/linux/x86_64/release/rules/qt/ui", "-DQT_NO_DEBUG", "-DQT_DEPRECATED_WARNINGS", "-DQT_OPENGL_LIB", "-DQT_NETWORK_LIB", "-DQT_GUI_LIB", "-DQT_WIDGETS_LIB", "-DQT_CORE_LIB", "-I", "/usr/include/x86_64-linux-gnu/qt5/QtOpenGL", "-I", "/usr/include/x86_64-linux-gnu/qt5/QtNetwork", "-I", "/usr/include/x86_64-linux-gnu/qt5/QtGui", "-I", "/usr/include/x86_64-linux-gnu/qt5/QtWidgets", "-I", "/usr/include/x86_64-linux-gnu/qt5/QtCore", "-I", "/usr/include/x86_64-linux-gnu/qt5", "-I", "/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++", "-DNDEBUG", "-fPIC", "-o"],
"file": "src/main.cpp"
},
{
"directory": "/tmp/test",
"arguments": ["/usr/bin/gcc", "-c", "-m64", "-fvisibility=hidden", "-fvisibility-inlines-hidden", "-O3", "-std=c++11", "-I/tmp/test/build/.gens/qtcc/linux/x86_64/release/rules/qt/ui", "-DQT_NO_DEBUG", "-DQT_DEPRECATED_WARNINGS", "-DQT_OPENGL_LIB", "-DQT_NETWORK_LIB", "-DQT_GUI_LIB", "-DQT_WIDGETS_LIB", "-DQT_CORE_LIB", "-I", "/usr/include/x86_64-linux-gnu/qt5/QtOpenGL", "-I", "/usr/include/x86_64-linux-gnu/qt5/QtNetwork", "-I", "/usr/include/x86_64-linux-gnu/qt5/QtGui", "-I", "/usr/include/x86_64-linux-gnu/qt5/QtWidgets", "-I", "/usr/include/x86_64-linux-gnu/qt5/QtCore", "-I", "/usr/include/x86_64-linux-gnu/qt5", "-I", "/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++", "-DNDEBUG", "-fPIC", "-o", "build/.objs/qtcc/linux/x86_64/release/src/main.cpp.o", "src/main.cpp"],
"file": "src/main.cpp"
}]
Xmake Version
2.6.9
Operating System Version and Architecture
5.17.15-1-Manjaro x86_64
Describe Bug
xmake correctly generates compile_commands.json files with
xmake project -k compile_commands
. The vscode plugin generates incorrect (for Linux) compile_commands files when using Qt frameworks. The files contain Darwin-framework
directives.Working xmake compile_commands:
Not working xmake-vscode generated compile_commands:
Expected Behavior
The same files to be generated by the plugin as xmake. At least the same include directories, because that's what vscode mostly uses the files for.
Project Configuration
xmake.lua
Additional Information and Error Logs
n/a