forked from openPMD/openPMD-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
library_builders.bat
173 lines (137 loc) · 4.57 KB
/
library_builders.bat
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
set CURRENTDIR="%cd%"
:: BUILD_PREFIX="${BUILD_PREFIX:-/usr/local}"
set CPU_COUNT="2"
echo "CFLAGS: %CFLAGS%"
echo "CXXFLAGS: %CXXFLAGS%"
echo "LDFLAGS: %LDFLAGS%"
goto:main
:install_buildessentials
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade "patch==1.*"
exit /b 0
:build_adios2
if exist adios2-stamp exit /b 0
curl -sLo adios2-2.7.1.zip ^
https://github.com/ornladios/ADIOS2/archive/v2.7.1.zip
powershell Expand-Archive adios2-2.7.1.zip -DestinationPath dep-adios2
:: Patch Blosc Compression w/ ADIOS 2.7.1
curl -sLo adios2-blosc.patch ^
https://patch-diff.githubusercontent.com/raw/ornladios/ADIOS2/pull/2746.patch
python -m patch -p 1 -d dep-adios2/ADIOS2-2.7.1 adios2-blosc.patch
cmake -S dep-adios2/ADIOS2-2.7.1 -B build-adios2 ^
-DCMAKE_BUILD_TYPE=Release ^
-DBUILD_SHARED_LIBS=OFF ^
-DBUILD_TESTING=OFF ^
-DADIOS2_USE_MPI=OFF ^
-DADIOS2_BUILD_EXAMPLES=OFF ^
-DADIOS2_USE_Blosc=ON ^
-DADIOS2_USE_BZip2=OFF ^
-DADIOS2_USE_Fortran=OFF ^
-DADIOS2_USE_HDF5=OFF ^
-DADIOS2_USE_PNG=OFF ^
-DADIOS2_USE_Profiling=OFF ^
-DADIOS2_USE_Python=OFF ^
-DADIOS2_USE_ZeroMQ=OFF ^
-DADIOS2_USE_ZFP=ON ^
-DADIOS2_RUN_INSTALL_TEST=OFF
if errorlevel 1 exit 1
:: TODO: Could NOT find HDF5 (missing: HDF5_LIBRARIES C)
:: -DADIOS2_USE_HDF5=ON
cmake --build build-adios2 --parallel %CPU_COUNT%
if errorlevel 1 exit 1
cmake --build build-adios2 --target install --config Release
if errorlevel 1 exit 1
break > adios2-stamp
if errorlevel 1 exit 1
exit /b 0
:build_blosc
if exist blosc-stamp exit /b 0
curl -sLo blosc-1.21.0.zip ^
https://github.com/Blosc/c-blosc/archive/v1.21.0.zip
powershell Expand-Archive blosc-1.21.0.zip -DestinationPath dep-blosc
cmake -S dep-blosc/c-blosc-1.21.0 -B build-blosc ^
-DCMAKE_BUILD_TYPE=Release ^
-DBUILD_BENCHMARKS=OFF ^
-DBUILD_SHARED=OFF ^
-DBUILD_STATIC=ON ^
-DBUILD_TESTS=OFF ^
-DDEACTIVATE_SNAPPY=ON
if errorlevel 1 exit 1
cmake --build build-blosc --parallel %CPU_COUNT%
if errorlevel 1 exit 1
cmake --build build-blosc --target install --config Release
if errorlevel 1 exit 1
break > blosc-stamp
if errorlevel 1 exit 1
exit /b 0
:build_hdf5
if exist hdf5-stamp exit /b 0
curl -sLo hdf5-1.12.0.zip ^
https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.0/src/hdf5-1.12.0.zip
powershell Expand-Archive hdf5-1.12.0.zip -DestinationPath dep-hdf5
cmake -S dep-hdf5/hdf5-1.12.0 -B build-hdf5 ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_VERBOSE_MAKEFILE=ON ^
-DBUILD_SHARED_LIBS=OFF ^
-DBUILD_TESTING=OFF ^
-DHDF5_BUILD_CPP_LIB=OFF ^
-DHDF5_BUILD_EXAMPLES=OFF ^
-DHDF5_BUILD_FORTRAN=OFF ^
-DHDF5_BUILD_HL_LIB=OFF ^
-DHDF5_BUILD_TOOLS=OFF ^
-DHDF5_ENABLE_PARALLEL=OFF ^
-DHDF5_ENABLE_SZIP_SUPPORT=OFF ^
-DHDF5_ENABLE_Z_LIB_SUPPORT=ON
if errorlevel 1 exit 1
cmake --build build-hdf5 --parallel %CPU_COUNT%
if errorlevel 1 exit 1
cmake --build build-hdf5 --target install --config Release
if errorlevel 1 exit 1
break > hdf5-stamp
if errorlevel 1 exit 1
exit /b 0
:build_zfp
if exist zfp-stamp exit /b 0
curl -sLo zfp-0.5.5.tar.gz ^
https://github.com/LLNL/zfp/releases/download/0.5.5/zfp-0.5.5.tar.gz
tar -xvzf zfp-0.5.5.tar.gz
mv zfp-0.5.5 dep-zfp
cmake -S dep-zfp -B build-zfp ^
-DCMAKE_BUILD_TYPE=Release ^
-DBUILD_SHARED_LIBS=OFF ^
-DBUILD_TESTING=OFF ^
-DBUILD_UTILITIES=OFF ^
-DZFP_WITH_OPENMP=OFF
if errorlevel 1 exit 1
cmake --build build-zfp --parallel %CPU_COUNT%
if errorlevel 1 exit 1
cmake --build build-zfp --target install --config Release
if errorlevel 1 exit 1
break > zfp-stamp
if errorlevel 1 exit 1
exit /b 0
:build_zlib
if exist zlib-stamp exit /b 0
curl -sLo zlib-1.2.11.zip ^
https://github.com/madler/zlib/archive/v1.2.11.zip
powershell Expand-Archive zlib-1.2.11.zip -DestinationPath dep-zlib
cmake -S dep-zlib/zlib-1.2.11 -B build-zlib ^
-DBUILD_SHARED_LIBS=OFF
if errorlevel 1 exit 1
:: TODO: zlib 1.2.11 ignores -DCMAKE_BUILD_TYPE=Release
cmake --build build-zlib --parallel %CPU_COUNT%
if errorlevel 1 exit 1
cmake --build build-zlib --target install --config Release
if errorlevel 1 exit 1
break > zlib-stamp
if errorlevel 1 exit 1
exit /b 0
:main
call :install_buildessentials
call :build_zlib
:: build_bzip2
:: build_szip
call :build_blosc
call :build_zfp
call :build_hdf5
call :build_adios2