forked from gpufit/Gpufit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_gpufit_linux.sh
executable file
·41 lines (30 loc) · 1.14 KB
/
build_gpufit_linux.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
#!/bin/sh
# build gpufit in a new directory prefixed with the current date/time. Assume that this script is run from the top directory of the gpufit source code. The code will be built in a folder one level above this
script_dir_rel="$(dirname -- "$(readlink -f "${BASH_SOURCE}")")"
script_dir="$(readlink -f "${script_dir_rel}")"
# #######################
# define location of cmake
# #######################
# input path to cmake command manually if desired
#cmake_path="/home/ptbrown/cmake-3.20.1-linux-x86_64/bin/cmake"
# otherwise use system cmake
cmake_path="cmake"
# #######################
# set build directory
# #######################
# directory where gpufit will be built
build_dir_rel="$script_dir""/../"$(date +"%Y_%m_%d_%H_%M_%S")_gpufit_build
# resolve full path for convenience
build_dir="$(readlink -f "${build_dir_rel}")"
#build_dir=../Gpufit
# build directory and move there
mkdir $build_dir
cd $build_dir
echo "building GPUfit from ${script_dir} to directory ${build_dir}"
# #######################
# build
# #######################
# generate build files
$cmake_path -DCMAKE_BUILD_TYPE=RELEASE "$script_dir"
# build GPUfit
make