-
Notifications
You must be signed in to change notification settings - Fork 751
/
Copy pathcppbuild.sh
executable file
·65 lines (62 loc) · 2.49 KB
/
cppbuild.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
#!/bin/bash
# This file is meant to be included by the parent cppbuild.sh script
if [[ -z "$PLATFORM" ]]; then
pushd ..
bash cppbuild.sh "$@" mkl
popd
exit
fi
mkdir -p "$PLATFORM"
cd "$PLATFORM"
INSTALL_PATH=`pwd`
mkdir -p include lib bin
case $PLATFORM in
linux-x86)
if [[ ! -d "/opt/intel/oneapi/mkl/" ]]; then
echo "Please install MKL under the default installation directory"
exit 1
fi
cp -a /opt/intel/oneapi/mkl/latest/include/* include/
cp -a /opt/intel/oneapi/mkl/latest/lib32/* /opt/intel/oneapi/compiler/latest/lib32/* lib/
;;
linux-x86_64)
if [[ ! -d "/opt/intel/oneapi/mkl/" ]]; then
echo "Please install MKL under the default installation directory"
exit 1
fi
cp -a /opt/intel/oneapi/mkl/latest/include/* include/
cp -a /opt/intel/oneapi/mkl/latest/lib/* /opt/intel/oneapi/compiler/latest/lib/* lib/
;;
macosx-*)
if [[ ! -d "/opt/intel/oneapi/mkl/" ]]; then
echo "Please install MKL under the default installation directory"
exit 1
fi
cp -a /opt/intel/oneapi/mkl/latest/include/* include/
cp -a /opt/intel/oneapi/mkl/latest/lib/* /opt/intel/oneapi/compiler/latest/lib/* lib/
;;
windows-x86)
if [[ ! -d "/C/Program Files (x86)/Intel/oneAPI/" ]]; then
echo "Please install MKL under the default installation directory"
exit 1
fi
cp -a /C/Program\ Files\ \(x86\)/Intel/oneAPI/mkl/latest/include/* include/
cp -a /C/Program\ Files\ \(x86\)/Intel/oneAPI/mkl/latest/lib32/* lib/
cp -a /C/Program\ Files\ \(x86\)/Intel/oneAPI/mkl/latest/bin32/* bin/
cp -a /C/Program\ Files\ \(x86\)/Intel/oneAPI/compiler/latest/bin32/* bin/
;;
windows-x86_64)
if [[ ! -d "/C/Program Files (x86)/Intel/oneAPI/" ]]; then
echo "Please install MKL under the default installation directory"
exit 1
fi
cp -a /C/Program\ Files\ \(x86\)/Intel/oneAPI/mkl/latest/include/* include/
cp -a /C/Program\ Files\ \(x86\)/Intel/oneAPI/mkl/latest/lib/* lib/
cp -a /C/Program\ Files\ \(x86\)/Intel/oneAPI/mkl/latest/bin/* bin/
cp -a /C/Program\ Files\ \(x86\)/Intel/oneAPI/compiler/latest/bin/* bin/
;;
*)
echo "Error: Platform \"$PLATFORM\" is not supported"
;;
esac
rm include/ia32 include/intel64 lib/ia32 lib/intel64 lib/locale bin/ia32 bin/intel64 bin/locale | true