File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 232232
233233log " Configure Thrust and CUB..."
234234
235+ # Clear out any stale CMake configs:
236+ rm -rf CMakeCache.txt CMakeFiles/
237+
235238echo_and_run_timed " Configure" cmake .. ${CMAKE_FLAGS}
239+ configure_status=$?
236240
237241log " Build Thrust and CUB..."
238242
239243# ${PARALLEL_LEVEL} needs to be passed after we run
240244# determine_build_parallelism.bash, so it can't be part of ${CMAKE_BUILD_FLAGS}.
241245set +e # Don't stop on build failures.
242246echo_and_run_timed " Build" cmake --build . ${CMAKE_BUILD_FLAGS} -j ${PARALLEL_LEVEL}
247+ build_status=$?
243248set -e
244249
245250# ###############################################################################
@@ -249,4 +254,20 @@ set -e
249254log " Test Thrust and CUB..."
250255
251256echo_and_run_timed " Test" ctest ${CTEST_FLAGS}
257+ test_status=$?
258+
259+ # ###############################################################################
260+ # SUMMARY - Print status of each step and exit with failure if needed.
261+ # ###############################################################################
252262
263+ log " Summary:"
264+ log " - Configure Error Code: ${configure_status} "
265+ log " - Build Error Code: ${build_status} "
266+ log " - Test Error Code: ${test_status} "
267+
268+
269+ if [[ " ${configure_status} " != " 0" ]] || \
270+ [[ " ${build_status} " != " 0" ]] || \
271+ [[ " ${test_status} " != " 0" ]]; then
272+ exit 1
273+ fi
You can’t perform that action at this time.
0 commit comments