-
Notifications
You must be signed in to change notification settings - Fork 0
/
ants_build_instructions.sh
51 lines (34 loc) · 1.06 KB
/
ants_build_instructions.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
#!/bin/bash
antsBuildInstructions="https://github.com/ANTsX/ANTs/wiki/Compiling-ANTs-on-Linux-and-Mac-OS"
# Number of threads used by make
buildThreads="$1"
workingDir=${PWD}
echo "Building ANTs using ${buildThreads} threads."
# Clone the repo
git clone https://github.com/ANTsX/ANTs.git --branch v2.5.0
# Where to build, should be an empty directory
buildDir=${workingDir}/build
installDir=${workingDir}/install
mkdir $buildDir $installDir
cd $buildDir
# USE_VTK must be turned on to build antsSurf
cmake \
-DCMAKE_INSTALL_PREFIX=$installDir \
-DBUILD_SHARED_LIBS=OFF \
-DUSE_VTK=OFF \
-DBUILD_TESTING=OFF \
-DRUN_LONG_TESTS=OFF \
-DRUN_SHORT_TESTS=OFF \
${workingDir}/ANTs 2>&1 | tee cmake.log
make -j $buildThreads 2>&1 | tee build.log
cd ANTS-build
make install 2>&1 | tee install.log
antsRegExe="${installDir}/bin/antsRegistration"
echo "Installation complete, running ${antsRegExe}"
${antsRegExe} --version
echo "
Binaries and scripts are located in
$installDir
Please see post installation instructions at
$antsBuildInstructions
"