mirror of
https://github.com/uowuo/abaddon.git
synced 2024-11-10 06:00:10 +00:00
Add compile_commands.json CMake script, and Lapce runners (#302)
* Add Lapce runner to run CMake This is necessary to generate the compile_commands.json file which clangd uses to be able to load libaries like gtkmm. * Move compile_commands generation script into separate file * Add more Lapce run settings * Set execute bit on gen_compile_commands.sh * Move Lapce run files to .lapce
This commit is contained in:
parent
10e436891b
commit
766be2624c
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,6 +3,9 @@
|
|||||||
##
|
##
|
||||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||||
|
|
||||||
|
# Build directory contents
|
||||||
|
build/*
|
||||||
|
|
||||||
# User-specific files
|
# User-specific files
|
||||||
*.rsuser
|
*.rsuser
|
||||||
*.suo
|
*.suo
|
||||||
|
7
.lapce/gen_compile_commands.sh
Executable file
7
.lapce/gen_compile_commands.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Use this script to create the compile_commands.json file.
|
||||||
|
# This is necessary for clangd completion.
|
||||||
|
|
||||||
|
cmake . -B build \
|
||||||
|
-DCMAKE_BUILD_TYPE=Debug \
|
||||||
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=True
|
24
.lapce/run.toml
Normal file
24
.lapce/run.toml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# The run config is used for both run mode and debug mode
|
||||||
|
|
||||||
|
[[configs]]
|
||||||
|
name = "cmake-debug"
|
||||||
|
program = "sh"
|
||||||
|
args = [".lapce/gen_compile_commands.sh"]
|
||||||
|
|
||||||
|
[configs.env]
|
||||||
|
CC = "/usr/bin/clang"
|
||||||
|
CXX = "/usr/bin/clang++"
|
||||||
|
|
||||||
|
[[configs]]
|
||||||
|
name = "cmake"
|
||||||
|
program = "cmake"
|
||||||
|
args = ["--build", "build"]
|
||||||
|
|
||||||
|
[configs.env]
|
||||||
|
CC = "/usr/bin/clang"
|
||||||
|
CXX = "/usr/bin/clang++"
|
||||||
|
|
||||||
|
[[configs]]
|
||||||
|
name = "run"
|
||||||
|
type = "lldb"
|
||||||
|
program = "build/abaddon"
|
1
compile_commands.json
Symbolic link
1
compile_commands.json
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
build/compile_commands.json
|
Loading…
Reference in New Issue
Block a user