-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathcppbuild.sh
41 lines (37 loc) · 969 Bytes
/
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
#!/usr/bin/env bash
# Scripts to build and install native C++ libraries
# Adapted from https://github.com/bytedeco/javacpp-presets
set -eu
if [[ -z "$PLATFORM" ]]; then
pushd ..
bash cppbuild.sh "$@" YacuDecu
popd
exit
fi
case $PLATFORM in
linux-x86_64)
#$CMAKE -DCMAKE_BUILD_TYPE=Release \
# -DCMAKE_INSTALL_PREFIX="../.." \
# -DCMAKE_CXX_COMPILER="/usr/bin/g++" \
# -DCMAKE_CUDA_HOST_COMPILER="/usr/bin/g++" ..
cp ../Makefile Makefile
mkdir -p ../../lib
make clean
make
make install
;;
macosx-*)
echo "TODO"
;;
windows-x86_64)
echo "Windows-x86 64 build"
cp ../Makefile.windows Makefile.windows
mkdir -p ../../lib
nmake -f Makefile.windows clean
nmake -f Makefile.windows
nmake -f Makefile.windows install
;;
*)
echo "Error: Platform \"$PLATFORM\" is not supported"
;;
esac