coreutils

General Software Utilities
git clone http://git.omkov.net/coreutils
Log | Tree | Refs | README | LICENCE | Download

AuthorJamozed <[email protected]>
Date2020-07-14 01:46:56
Commita2aca68acc40099aa5b3bb5c208f5809a42af782
Parentf45f8cb3db6291c50aa273bd96ed9b41deb8bbc5

meta: Update UNIX build script

Diffstat

M .gitignore | 5 +----
A BuildUNIX.sh | 10 ++++++++++
D build/buildUNIX.sh | 4 ----

3 files changed, 11 insertions, 8 deletions

diff --git a/.gitignore b/.gitignore
index 99dc2fa..2254195 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,5 @@
 .clangd/
 bin/
-build/*
-!build/buildUNIX.sh
-!build/buildWIN32.bat
-!build/buildWIN64.bat
+build/
 compile_commands.json
 lib/
diff --git a/BuildUNIX.sh b/BuildUNIX.sh
new file mode 100755
index 0000000..d59505f
--- /dev/null
+++ b/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"
diff --git a/build/buildUNIX.sh b/build/buildUNIX.sh
deleted file mode 100755
index 38dd3a2..0000000
--- a/build/buildUNIX.sh
+++ /dev/null
@@ -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"