Renombrar buildGDExtension.sh y añadir función de generar compile_commands.json
Signed-off-by: somebody_master <somebody_master@somebodyserver.mooo.com>
This commit is contained in:
parent
c6a43f48c4
commit
cd9a30e714
27
build.sh
Executable file
27
build.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function build() {
|
||||||
|
cd gdextension || exit
|
||||||
|
scons -j 12
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function build_db() {
|
||||||
|
cd gdextension || exit
|
||||||
|
scons --clean
|
||||||
|
bear -- scons -j 12
|
||||||
|
ln -s compile_commands.json ../
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
while getopts "bdh:" flag; do
|
||||||
|
case "$flag" in
|
||||||
|
d) build_db ;;
|
||||||
|
b) build ;;
|
||||||
|
h) echo "Use -b for build or -d for generating a compile_commands.json" ;;
|
||||||
|
?)
|
||||||
|
echo "script usage: $(basename \$0) [-b] [-d] [-h]" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
@ -1,4 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
cd gdextension || exit
|
|
||||||
scons -j 12
|
|
Loading…
Reference in New Issue
Block a user