working compdb export
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,4 +1,4 @@
|
||||
**PTHREADS-BUILT**
|
||||
**obj**
|
||||
**bin**
|
||||
.cache**
|
||||
compile_commands.json
|
||||
|
||||
2
build.sh
2
build.sh
@@ -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
8
export_compdb.sh
Normal 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
|
||||
@@ -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,
|
||||
Reference in New Issue
Block a user