There was an error while loading. Please reload this page.
1 parent 7a8ca21 commit 0a71211Copy full SHA for 0a71211
1 file changed
build_simple.sh
@@ -1,10 +1,29 @@
1
#!/bin/bash
2
3
-if [ ! -d tmp ]; then
4
- mkdir -p tmp
5
-fi
+check_ret() {
+ if [ $1 -ne 0 ]; then
+ echo ""
6
+ echo "!!! FAIL: $2"
7
+ echo "********************************************************************************"
8
9
+ exit $1
10
+ else
11
12
+ echo "*** SUCCESS: $2"
13
14
15
+ fi
16
+}
17
+
18
+cmake -H. -B./tmp/release -DCMAKE_BUILD_TYPE=Release
19
+check_ret $? "configure"
20
21
+cmake --build ./tmp/release --config Release
22
+check_ret $? "build"
23
24
+strip server
25
26
+cd ./tmp/release && ctest --output-on-failure
27
+check_ret $? "ctest"
28
-cd tmp
-cmake ..
-make
29
0 commit comments