Browse Source

meta: Update UNIX build script

master
Jake Wakeling 3 years ago
parent
commit
a2aca68acc
  1. 5
      .gitignore
  2. 10
      BuildUNIX.sh
  3. 4
      build/buildUNIX.sh

5
.gitignore vendored

@ -1,8 +1,5 @@
.clangd/
bin/
build/*
!build/buildUNIX.sh
!build/buildWIN32.bat
!build/buildWIN64.bat
build/
compile_commands.json
lib/

10
BuildUNIX.sh

@ -0,0 +1,10 @@
#!/usr/bin/env sh
dir="$(dirname $(realpath "$0"))"
cmake -S "${dir}" -B "${dir}/build" \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_EXPORT_COMPILE_COMMANDS=1
cmake --build "${dir}/build"
mv -f "${dir}/build/compile_commands.json" "${dir}/compile_commands.json"

4
build/buildUNIX.sh

@ -1,4 +0,0 @@
#!/usr/bin/env sh
dir="$(dirname $(realpath "$0"))" && cd "$dir"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ../ && make
mv -f "compile_commands.json" "../compile_commands.json"
Loading…
Cancel
Save