From 0abbb8133aec77e54095e726084af200374e1840 Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Thu, 8 Sep 2022 23:56:01 +0100 Subject: [PATCH] Added helper scripts to configure, compile and install using cmake --- compile | 3 +++ configure | 14 ++++++++++++++ install | 3 +++ 3 files changed, 20 insertions(+) create mode 100755 compile create mode 100755 configure create mode 100755 install diff --git a/compile b/compile new file mode 100755 index 0000000..8d1bb55 --- /dev/null +++ b/compile @@ -0,0 +1,3 @@ +#!/bin/bash + +cmake --build build diff --git a/configure b/configure new file mode 100755 index 0000000..26b8153 --- /dev/null +++ b/configure @@ -0,0 +1,14 @@ +#!/bin/bash + +BUILD_TYPE="" + +if [[ "$1" == "Release" ]] || [[ "$1" == "RELEASE" ]] || [[ "$1" == "release" ]] +then + BUILD_TYPE="Release" +else + BUILD_TYPE="Debug" +fi + +cmake -DCMAKE_BUILD_TYPE="$BUILD_TYPE" -DCMAKE_INSTALL_PREFIX="dist" -S . -B build -G "Ninja" +rm compile_commands.json +cp build/compile_commands.json ./ diff --git a/install b/install new file mode 100755 index 0000000..cc47223 --- /dev/null +++ b/install @@ -0,0 +1,3 @@ +#!/bin/bash + +cmake --install build