-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·80 lines (61 loc) · 1.39 KB
/
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/sh
CMAKE_OPTIONS=
DEFAULT_VERIFY_USED=true
VERIFY_USED=${DEFAULT_VERIFY_USED}
DEFAULT_CMAKE_BUILD_TYPE=Debug
CMAKE_BUILD_TYPE=${DEFAULT_CMAKE_BUILD_TYPE}
DEFAULT_CONFIGURE_MODE=Developer
CONFIGURE_MODE=${DEFAULT_CONFIGURE_MODE}
DEFAULT_PROJECT_IS_SNAPSHOT=true
PROJECT_IS_SNAPSHOT=${DEFAULT_PROJECT_IS_SNAPSHOT}
# ci
function_ci() {
function_release
}
# release
function_release() {
CMAKE_BUILD_TYPE=Release
CONFIGURE_MODE=Real
PROJECT_IS_SNAPSHOT=false
VERIFY_USED=true
}
# debug
function_debug() {
CMAKE_BUILD_TYPE=Debug
}
# verify
function_verify() {
VERIFY_USED=true
}
# skipITs
function_skipITs() {
VERIFY_USED=false
}
# noSnapshot
function_noSnapshot() {
PROJECT_IS_SNAPSHOT=false
}
# realPaths
function_realPaths() {
CONFIGURE_MODE=Real
}
# clean
function_clean() {
rm -rf ./target
rm -rf ./*.tar.gz ./*.rpm ./*.sh ./*.deb ./*.tar.Z ./*.7z ./*.tar.bz2 ./*.tar.xz ./*.zip
rm -rf ./*.cmake ./Testing ./CMakeFiles ./_CPack_Packages install_manifest.txt CMakeCache.txt Makefile
exit 0
}
generate() {
CMAKE_OPTIONS="-DVERIFY_USED=${VERIFY_USED} -DPROJECT_IS_SNAPSHOT=${PROJECT_IS_SNAPSHOT} -DCONFIGURE_MODE=${CONFIGURE_MODE} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${CMAKE_OPTIONS}"
callCommand cmake ${CMAKE_OPTIONS} .
}
callCommand() {
echo "$@"
"$@"
}
for SUFFIX in "$@"; do
function_${SUFFIX}
done
generate
exit ${?}