-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcommand.sh
More file actions
executable file
·108 lines (101 loc) · 2.7 KB
/
Copy pathcommand.sh
File metadata and controls
executable file
·108 lines (101 loc) · 2.7 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/usr/bin/bash
ANTSLIBS=(
-pthread -lstdc++ -Wl,--no-as-needed -ldl
-ll_antsApplyTransforms
-ll_SmoothImage
-lantsUtilities
)
ITKLIBS=(
-lITKIOTransformMatlab-5.3
-lITKIOTransformHDF5-5.3
-lITKIOTransformInsightLegacy-5.3
-lITKIOTransformBase-5.3
-lITKIOLSM-5.3
-lITKIOGE-5.3
-lITKTransformFactory-5.3
-litkMGHIO-5.3
-lITKIOXML-5.3
-lITKIOVTK-5.3
-lITKIOStimulate-5.3
-lITKIOSiemens-5.3
-lITKIONRRD-5.3
-lITKIOPNG-5.3
-lITKIONIFTI-5.3
-lITKIOMeta-5.3
-lITKIOMRC-5.3
-lITKIOMINC-5.3
-lITKIOTIFF-5.3
-lITKIOJPEG-5.3
-lITKIOJPEG2000-5.3
-lITKIOHDF5-5.3
-lITKIOGDCM-5.3
-lITKIOGIPL-5.3
-lITKIOIPL-5.3
-lITKIOBruker-5.3
-lITKIOCSV-5.3
-lITKIOBioRad-5.3
-lITKIOBMP-5.3
-lITKIOImageBase-5.3
-litkminc2-5.3
-lITKTransform-5.3
-lITKCommon-5.3
-lhdf5_hl_cpp-static
-litkhdf5_hl-static-5.3
-litkhdf5_cpp-static-5.3
-litkhdf5-static-5.3
-litkgdcmMSFF-5.3
-litkvnl_algo-5.3
-litkv3p_netlib-5.3
-litkgdcmDICT-5.3
-litkgdcmIOD-5.3
-litkvnl-5.3
-litkgdcmDSED-5.3
-litktiff-5.3
-lITKniftiio-5.3
-lITKMetaIO-5.3
-lITKNrrdIO-5.3
-litkpng-5.3
-litkjpeg-5.3
-litkopenjpeg-5.3
-litkgdcmsocketxx-5.3
-lITKznz-5.3
-litkgdcmopenjp2-5.3
-litkgdcmuuid-5.3
-litkgdcmcharls-5.3
-litkgdcmjpeg16-5.3
-litkgdcmjpeg8-5.3
-litkgdcmjpeg12-5.3
-litkgdcmCommon-5.3
-lITKEXPAT-5.3
-lITKSmoothing-5.3
-litkzlib-5.3
-litksys-5.3
-litkdouble-conversion-5.3
)
CXXFLAGS="-std=c++17"
if [ "$2" = "debug" ]; then
echo ">> DEBUG MODE COMPILATION <<"
CPPFLAGS="-fopenmp -O -g3 -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wconversion -Wno-sign-conversion -Wdouble-promotion ${@:3}"
else
echo ">> RELEASE MODE COMPILATION <<"
CPPFLAGS="-fopenmp -O3 -DNDEBUG -Wno-deprecated-declarations ${@:2}"
fi
LIBS="-L./externals/lib -static-libstdc++ -lboost_timer /home/tanderson/anaconda3/envs/math/lib/libpython3.12.so ${ANTSLIBS[@]} ${ITKLIBS[@]}"
INCLUDE="-I./externals/include -I/home/tanderson/anaconda3/envs/math/lib/python3.12/site-packages/numpy/core/include/"
SRC="./src"
BIN="./bin"
PROGRAM=main
echo "g++ ${CXXFLAGS} ${CPPFLAGS}" \
"$(python3-config --cflags) $(python3-config --ldflags --embed) $(python3-config --includes)" \
"${INCLUDE}" \
"${SRC}/${PROGRAM}.cpp" \
"${LIBS}"\
"-o ${BIN}/${PROGRAM}" \
"&& ${BIN}/${PROGRAM} $1"
g++ ${CXXFLAGS} ${CPPFLAGS} \
$(python3-config --cflags) $(python3-config --ldflags --embed) $(python3-config --includes) \
${INCLUDE} \
${SRC}/${PROGRAM}.cpp \
${LIBS} \
-o ${BIN}/${PROGRAM} \
&& ${BIN}/${PROGRAM} $1