File tree Expand file tree Collapse file tree 2 files changed +40
-18
lines changed Expand file tree Collapse file tree 2 files changed +40
-18
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ echo "::endgroup::"
143
143
144
144
145
145
echo " ::group::Test Apache Arrow C++"
146
+ mkdir -p build
146
147
${APT_INSTALL} libarrow-dev=${package_version}
147
148
required_packages=()
148
149
required_packages+=(cmake)
@@ -152,15 +153,25 @@ required_packages+=(make)
152
153
required_packages+=(pkg-config)
153
154
required_packages+=(${workaround_missing_packages[@]} )
154
155
${APT_INSTALL} ${required_packages[@]}
155
- mkdir -p build
156
- cp -a " ${TOP_SOURCE_DIR} /cpp/examples/minimal_build" build/
157
- pushd build/minimal_build
158
- cmake .
159
- make -j$( nproc)
160
- ./arrow-example
161
- c++ -o arrow-example example.cc $( pkg-config --cflags --libs arrow) -std=c++17
162
- ./arrow-example
163
- popd
156
+ # cmake version 3.31.6 -> 3.31.6
157
+ cmake_version=$( cmake --version | head -n1 | sed -e ' s/^cmake version //' )
158
+ # 3.31.6 -> 3.31
159
+ cmake_version_major_minor=${cmake_version% .* }
160
+ # 3.31 -> 3
161
+ cmake_version_major=${cmake_version_major_minor% .* }
162
+ # 3.31 -> 31
163
+ cmake_version_minor=${cmake_version_major_minor#* .}
164
+ if [ " ${cmake_version_major} " -gt " 3" ] || \
165
+ [ " ${cmake_version_major} " -eq " 3" -a " ${cmake_version_minor} " -ge " 25" ]; then
166
+ cp -a " ${TOP_SOURCE_DIR} /cpp/examples/minimal_build" build/
167
+ pushd build/minimal_build
168
+ cmake .
169
+ make -j$( nproc)
170
+ ./arrow-example
171
+ c++ -o arrow-example example.cc $( pkg-config --cflags --libs arrow) -std=c++17
172
+ ./arrow-example
173
+ popd
174
+ fi
164
175
echo " ::endgroup::"
165
176
166
177
Original file line number Diff line number Diff line change @@ -190,6 +190,7 @@ echo "::endgroup::"
190
190
191
191
192
192
echo " ::group::Test Apache Arrow C++"
193
+ mkdir -p build
193
194
${install_command} ${enablerepo_epel} arrow-devel-${package_version}
194
195
if [ -n " ${devtoolset} " ]; then
195
196
${install_command} ${scl_package}
@@ -214,15 +215,25 @@ else
214
215
gcc-c++ \
215
216
make
216
217
fi
217
- mkdir -p build
218
- cp -a " ${TOP_SOURCE_DIR} /cpp/examples/minimal_build" build/
219
- pushd build/minimal_build
220
- ${cmake_command} .
221
- make -j$( nproc)
222
- ./arrow-example
223
- c++ -o arrow-example example.cc $( pkg-config --cflags --libs arrow) -std=c++17
224
- ./arrow-example
225
- popd
218
+ # cmake version 3.31.6 -> 3.31.6
219
+ cmake_version=$( ${cmake_command} --version | head -n1 | sed -e ' s/^cmake version //' )
220
+ # 3.31.6 -> 3.31
221
+ cmake_version_major_minor=${cmake_version% .* }
222
+ # 3.31 -> 3
223
+ cmake_version_major=${cmake_version_major_minor% .* }
224
+ # 3.31 -> 31
225
+ cmake_version_minor=${cmake_version_major_minor#* .}
226
+ if [ " ${cmake_version_major} " -gt " 3" ] || \
227
+ [ " ${cmake_version_major} " -eq " 3" -a " ${cmake_version_minor} " -ge " 25" ]; then
228
+ cp -a " ${TOP_SOURCE_DIR} /cpp/examples/minimal_build" build/
229
+ pushd build/minimal_build
230
+ ${cmake_command} .
231
+ make -j$( nproc)
232
+ ./arrow-example
233
+ c++ -o arrow-example example.cc $( pkg-config --cflags --libs arrow) -std=c++17
234
+ ./arrow-example
235
+ popd
236
+ fi
226
237
echo " ::endgroup::"
227
238
228
239
if [ " ${have_glib} " = " yes" ]; then
You can’t perform that action at this time.
0 commit comments