From 2e27a93e3ed189b4d96ec7df6e05b102dd2e841a Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Mon, 18 Dec 2017 00:00:21 +0100 Subject: Replace tabs with spaces, set up CMake build system Other changes: - update gitignore - build scripts under `etc` - fix window --- etc/linux-build.sh | 5 +++++ etc/linux-clean-tree.sh | 31 +++++++++++++++++++++++++++++++ etc/linux-release-build.sh | 5 +++++ etc/windows-build.bat | 5 +++++ 4 files changed, 46 insertions(+) create mode 100755 etc/linux-build.sh create mode 100755 etc/linux-clean-tree.sh create mode 100755 etc/linux-release-build.sh create mode 100644 etc/windows-build.bat (limited to 'etc') diff --git a/etc/linux-build.sh b/etc/linux-build.sh new file mode 100755 index 0000000..a7b08ae --- /dev/null +++ b/etc/linux-build.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +mkdir -p build/debug +cmake -DCMAKE_BUILD_TYPE=Debug -H. -Bbuild/debug +cmake --build build/debug -- clean all diff --git a/etc/linux-clean-tree.sh b/etc/linux-clean-tree.sh new file mode 100755 index 0000000..80a858c --- /dev/null +++ b/etc/linux-clean-tree.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# WARNING: +# +# this script will delete *everything* that is not +# under version control +# + +POSITIONAL=() +CLEAN_ALL=false + +while [[ $# -gt 0 ]]; do + key="$1" + + case $key in + -a|--all) + CLEAN_ALL=true + shift + ;; + *) + POSITIONAL+=("$1") + shift + ;; + esac +done + +if [ "$CLEAN_ALL" = true ]; then + git clean -d -x -f +else + git clean -d -X -f +fi diff --git a/etc/linux-release-build.sh b/etc/linux-release-build.sh new file mode 100755 index 0000000..1f0dd08 --- /dev/null +++ b/etc/linux-release-build.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +mkdir -p build/release +cmake -DCMAKE_BUILD_TYPE=Release -H. -Bbuild/release +cmake --build build/release -- clean all diff --git a/etc/windows-build.bat b/etc/windows-build.bat new file mode 100644 index 0000000..5d57706 --- /dev/null +++ b/etc/windows-build.bat @@ -0,0 +1,5 @@ +cd .. +mkdir build/debug +cmake -DCMAKE_BUILD_TYPE=Debug -H. -G "MinGW Makefiles" -Bbuild/debug +cmake --build build/debug -- clean all +pause -- cgit v1.2.1