diff --git a/.gitignore b/.gitignore index e47837d..b28524f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,9 @@ ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore +# Build directory contents +build/* + # User-specific files *.rsuser *.suo diff --git a/.lapce/gen_compile_commands.sh b/.lapce/gen_compile_commands.sh new file mode 100755 index 0000000..e9e7e9b --- /dev/null +++ b/.lapce/gen_compile_commands.sh @@ -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 \ No newline at end of file diff --git a/.lapce/run.toml b/.lapce/run.toml new file mode 100644 index 0000000..a309b78 --- /dev/null +++ b/.lapce/run.toml @@ -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" diff --git a/compile_commands.json b/compile_commands.json new file mode 120000 index 0000000..25eb4b2 --- /dev/null +++ b/compile_commands.json @@ -0,0 +1 @@ +build/compile_commands.json \ No newline at end of file