forked from openorbit/openorbit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
54 lines (43 loc) · 954 Bytes
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#! /bin/sh
# This is a conveniance script for configuring the open orbit builds.
# Note that this will generate a build tree under the build directory, you must
# cd to this directory after the configure script has been run in order to do
# a make.
# Supported options: --debug, --enable-tests
debug = 0
tests = 0
vectorise = 1
while [ $# != 0 ]
do
case $1 in
"--debug")
debug = 1
;;
;;
"--enable-test")
"--enable-tests")
tests = 1
;;
*)
echo $1: unknown option >&2
echo "Usage: ./configure [--debug] [--enable-tests]"
exit 1
;;
esac
done
if [ ! -d build ]; then
mkdir build || return 1
fi
if [ $debug == 1 ]; then
buildtype = "Debug"
else
buildtype = "Release"
fi
if [ $tests == 1 ]; then
testflags = "-DENABLE_TESTS:bool=true"
else
testflags = ""
fi
pushd build
cmake -DCMAKE_BUILD_TYPE:string=$buildtype $testflags ../
popd