-
Notifications
You must be signed in to change notification settings - Fork 3
/
install-dependencies.sh
executable file
·86 lines (72 loc) · 2.32 KB
/
install-dependencies.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
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
81
82
83
84
85
86
#!/bin/bash
# Installing dependencies needed to build CemicalFun on (k)ubuntu linux 20.04 or macOS
# Temporarily uncomment rows for packages that need to be re-installed
#sudo rm -rf /usr/local/include/nlohmann
#sudo rm -rf /usr/local/include/eigen3/Eigen/Eigen
#sudo rm -rf /usr/local/include/pybind11
#sudo rm -rf /usr/local/include/spdlog
# nlohmann/json library v. 3.6.1 or up
# if not installed in /usr/local/include/nlohmann)
test -f /usr/local/include/nlohmann/json.hpp || {
# Getting nlohmann/json library
mkdir -p ~/code && \
cd ~/code && \
git clone https://github.com/nlohmann/json.git && \
cd json && \
mkdir -p build && \
cd build && \
cmake .. -DCMAKE_BUILD_TYPE=Release -DJSON_BuildTests=OFF -DJSON_MultipleHeaders=ON && \
sudo make install
# Removing generated build files
cd ~ && \
rm -rf ~/code
}
# Eigen3 math library (added for building and installing xGEMS)
# if not installed in /usr/local/include/eigen3)
test -d /usr/local/include/eigen3/Eigen || {
# Building eigen library
mkdir -p ~/code && \
cd ~/code && \
git clone https://gitlab.com/libeigen/eigen.git -b 3.4.0 && \
cd eigen && \
mkdir -p build && \
cd build && \
cmake .. \
make && \
sudo make install
# Removing generated build files
cd ~ && \
rm -rf ~/code
}
# spdlog
# if no spdlog installed in /usr/local/include/spdlog (copy only headers)
test -d /usr/local/include/spdlog || {
# Building spdlog library
mkdir -p ~/code && \
cd ~/code && \
git clone https://github.com/gabime/spdlog -b v1.11.0 && \
cd spdlog/include && \
sudo cp -r spdlog /usr/local/include
# Removing generated build files
cd ~ && \
rm -rf ~/code
}
#Pybind11
test -d /usr/local/include/pybind11 || {
# Building pybind11 library
mkdir -p ~/code && \
cd ~/code && \
git clone https://github.com/pybind/pybind11.git && \
cd pybind11 && \
mkdir -p build && \
cd build && \
cmake .. -DPYBIND11_TEST=OFF && \
make && \
sudo make install
# Removing generated build files
cd ~ && \
rm -rf ~/code
}
if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
sudo ldconfig
fi