Fixes for warnings from clang++, from -std=gnu++0x, from swig, and from javac
[cvc5.git] / config / build-type
1 #!/bin/sh
2 #
3 # build-type
4 # Morgan Deters <mdeters@cs.nyu.edu> for CVC4
5 #
6 # usage: build-type profile [ overrides... ]
7 #
8 # Returns a build string for the given profile and overrides.
9 # For example, "build-type debug noassertions" returns the canonical
10 # build string for a debug build with assertions turned off.
11 #
12 # The default build directory for CVC4 is then (assuming a standard
13 # debug build):
14 #
15 # builds/`config/config.guess`/`config/build-type debug`
16 #
17 # This script is used both in CVC4's configure script and in the
18 # top-level Makefile when you build another profile than the
19 # "current" build (to see if there already was a build of that type).
20 #
21 # The overrides are as follows:
22 #
23 # staticbinary
24 # optimized
25 # proof
26 # debugsymbols
27 # assertions
28 # tracing
29 # muzzle
30 # coverage
31 # profiling
32 #
33 # Also you can specify "cln" or "gmp". If "cln", the build dir
34 # contains the string "cln". (gmp is considered the default.)
35 #
36
37 if [ $# -eq 0 ]; then
38 echo "usage: build-type profile [ overrides... ]" >&2
39 exit
40 fi
41
42 build_type=$1
43 shift
44
45 while [ $# -gt 0 ]; do
46 case "$1" in
47 cln) cln=1 ;;
48 gmp) ;;
49 no*) eval `expr "$1" : 'no\(.*\)'`=0 ;;
50 *) eval $1=1 ;;
51 esac
52 shift
53 done
54
55 build_type_suffix=
56 for arg in cln staticbinary optimized proof debugsymbols statistics replay assertions tracing muzzle coverage profiling; do
57 if eval [ -n '"${'$arg'+set}"' ]; then
58 if eval [ '"${'$arg'}"' -eq 0 ]; then
59 build_type_suffix=$build_type_suffix-no$arg
60 else
61 build_type_suffix=$build_type_suffix-$arg
62 fi
63 fi
64 done
65
66 echo $build_type$build_type_suffix