summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-05-30 12:50:01 +0200
committerHampusM <hampus@hampusmat.com>2022-05-30 12:50:01 +0200
commit1452435a8d662bbd39f0c812cdc24ddd4ec226d3 (patch)
treec9e55e696c975ca1b85ac3c01d979fd312354d12
parentdeaf3d4323f6fbc997c2d280fee16b39fd192de1 (diff)
build(minion): add override compiledb path
-rw-r--r--minion/platformio.ini1
-rw-r--r--minion/scripts/override_compiledb_path.py7
2 files changed, 8 insertions, 0 deletions
diff --git a/minion/platformio.ini b/minion/platformio.ini
index 75ca9d1..2abc5cf 100644
--- a/minion/platformio.ini
+++ b/minion/platformio.ini
@@ -15,3 +15,4 @@ build_src_flags =
-Wconversion
-pedantic
-felide-constructors
+extra_scripts = post:scripts/override_compiledb_path.py
diff --git a/minion/scripts/override_compiledb_path.py b/minion/scripts/override_compiledb_path.py
new file mode 100644
index 0000000..38f52e9
--- /dev/null
+++ b/minion/scripts/override_compiledb_path.py
@@ -0,0 +1,7 @@
+import os
+
+Import("env")
+
+path = os.path.join("$BUILD_DIR", "compile_commands.json")
+
+env.Replace(COMPILATIONDB_PATH=path)