-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild
executable file
·49 lines (41 loc) · 1.26 KB
/
build
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
#!/bin/bash
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*) machine=Linux;;
Darwin*) machine=Mac;;
CYGWIN*) machine=Cygwin;;
MINGW*) machine=MinGw;;
*) machine="UNKNOWN:${unameOut}"
esac
if [[ $machine == "Linux" ]]
then
echo "Detected ${machine} environment. Building."
source .venv/bin/activate
cd dry/
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cd ..
source workon
cd wet/
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cd ..
source workon
cd dry/build/open3d_colcon/
make install-pip-package -j${nproc}
fi
if [[ $machine == "Mac" ]]
then
echo "Detected ${machine} environment. Building with CPU support only."
touch ./wet/src/sogmm_open3d/COLCON_IGNORE
source .venv/bin/activate
cd dry/
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cd ..
source workon
cd wet/
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cd ..
source workon
numcores=$(sysctl -n hw.logicalcpu)
cd dry/build/open3d_colcon/
make install-pip-package -j${numcores}
fi