working compdb export

This commit is contained in:
2025-09-07 14:05:49 -05:00
parent c28caef038
commit ab639e635a
5 changed files with 10 additions and 17 deletions

2
.gitignore vendored
View File

@@ -1,4 +1,4 @@
**PTHREADS-BUILT**
**obj**
**bin**
.cache**
compile_commands.json

View File

@@ -1,5 +1,5 @@
(
cd bin
srcs=../src/*
cl $srcs -I ../inc/ -Od -std:c++20 -Fe main.exe
cl $srcs -I ../inc/ -Od -std:c++20 -Fe
)

8
export_compdb.sh Normal file
View File

@@ -0,0 +1,8 @@
srcs=src/*
working_dir=$pwd
echo [ > compile_commands.json
find src -iname "*.cpp" -exec sh -c 'echo { \"directory\": \"$(pwd)\", \"command\": \"cl {} -I inc -Od -std:c++20 -Fo\", \"file\": \"{}\" }, >> compile_commands.json' \;
echo ] >> compile_commands.json

View File

@@ -1,12 +0,0 @@
srcs=src/*
working_dir=$pwd
command_pre="cl"
command_post="-I inc -Od -std:c++20 -Fo"
echo [ > compile_commands.json
find src -iname "*.cpp" -o -iname "*.c" -exec sh -c 'echo { "directory": "$(pwd)", "command": "$(command_pre) {} $(command_pos)", "file": "{}" }, >> compile_commands.json' \;
echo ] >> compile_commands.json
# axiomatic,

View File

@@ -1,3 +0,0 @@
10 2000 150000 2
1 200
0 10000