-
Notifications
You must be signed in to change notification settings - Fork 4
/
host_build.sh
executable file
·54 lines (34 loc) · 1.5 KB
/
host_build.sh
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/bash
set +x
set -e
print_next_step() {
echo
echo "====================================="
echo " $1"
echo "====================================="
echo
}
#=======================================================================================================================
if [ "$1" == "clean" ]; then
print_next_step "Clean artifacts"
rm -rf ./build/
conan remove 'poco*' -c
conan remove 'gtest*' -c
conan remove 'libp11*' -c
fi
#=======================================================================================================================
print_next_step "Setting up conan default profile"
conan profile detect --force
#=======================================================================================================================
print_next_step "Generate conan toolchain"
conan install ./conan/ --output-folder build --settings=build_type=Debug --options=with_poco=True --build=missing
#=======================================================================================================================
print_next_step "Run cmake"
cd ./build
cmake .. -DCMAKE_TOOLCHAIN_FILE=./conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_COVERAGE=ON -DWITH_TEST=ON
#=======================================================================================================================
print_next_step "Run make"
make -j4
#=======================================================================================================================
echo
echo "Build succeeded!"