forked from nutjunkie/IQmol
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure
More file actions
executable file
·42 lines (35 loc) · 796 Bytes
/
configure
File metadata and controls
executable file
·42 lines (35 loc) · 796 Bytes
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
#!/bin/sh
CMAKE_INSTALL_PREFIX="/usr/local"
CMAKE_BUILD_TYPE=""
usage() {
echo "./configure [--prefix=...] [--debug]"
echo ""
}
while [ "$1" != "" ]; do
PARAM=`echo $1 | awk -F= '{print $1}'`
VALUE=`echo $1 | sed 's/^[^=]*=//g'`
case $PARAM in
-h | --help)
usage
exit
;;
--prefix)
CMAKE_INSTALL_PREFIX="$VALUE"
;;
--debug)
CMAKE_BUILD_TYPE="DEBUG"
;;
*)
echo "Unknown parameter \"$PARAM\""
usage
exit 1
;;
esac
shift
done
mkdir -p build
cd build
if [ -e CMakeCache.txt ]; then
rm CMakeCache.txt
fi
cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" -DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" ..