BuildSystem: Export compile commands for clangd
This commit is contained in:
parent
b89fc3fe87
commit
e6ed5a388d
|
@ -0,0 +1,13 @@
|
||||||
|
Diagnostics:
|
||||||
|
Suppress: target_unsupported_type
|
||||||
|
|
||||||
|
CompileFlags:
|
||||||
|
Remove: [
|
||||||
|
-fstrict-volatile-bitfields,
|
||||||
|
-fno-tree-loop-distribute-patterns
|
||||||
|
]
|
||||||
|
Add: [
|
||||||
|
-D__banan_os__,
|
||||||
|
-D__arch__=x86_64,
|
||||||
|
-D__x86_64__
|
||||||
|
]
|
|
@ -2,5 +2,9 @@
|
||||||
"cmake.configureOnOpen": false,
|
"cmake.configureOnOpen": false,
|
||||||
"editor.tabSize": 4,
|
"editor.tabSize": 4,
|
||||||
"editor.insertSpaces": false,
|
"editor.insertSpaces": false,
|
||||||
"editor.detectIndentation": false
|
"editor.detectIndentation": false,
|
||||||
|
"clangd.arguments": [
|
||||||
|
"--compile-commands-dir=${workspaceFolder}/build",
|
||||||
|
"-header-insertion=never"
|
||||||
|
]
|
||||||
}
|
}
|
|
@ -29,6 +29,8 @@ set(CMAKE_STATIC_LIBRARY_PREFIX "")
|
||||||
set(CMAKE_SHARED_LIBRARY_PREFIX "")
|
set(CMAKE_SHARED_LIBRARY_PREFIX "")
|
||||||
set(BUILD_SHARED_LIBS True)
|
set(BUILD_SHARED_LIBS True)
|
||||||
|
|
||||||
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue