File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -41,14 +41,20 @@ src_dir=$PWD
41
41
mkdir -p " $CI_DIR "
42
42
cd " $CI_DIR "
43
43
git --no-pager log -1 || true
44
- cmake " $src_dir " " ${CMAKE_ARGS[@]+" ${CMAKE_ARGS[@]} " } "
44
+ cmake_args=(" ${CMAKE_ARGS[@]+" ${CMAKE_ARGS[@]} " } " )
45
+ if ! cmake " $src_dir " " ${cmake_args[@]} " ; then
46
+ # If cmake failed, try it again with debug options.
47
+ # Could add --trace / --trace-expand here too for more information but these are very verbose.
48
+ cmake_args+=(--debug-find --debug-trycompile --log-level=DEBUG)
49
+ cmake " $src_dir " " ${cmake_args[@]} "
50
+ fi
45
51
if ver_ge " $cmake_ver " " 3.15" ; then
46
- cmake --build . -t " ${BUILD_TARGETS[@]} " -- " ${BUILD_ARGS[@]+" ${BUILD_ARGS[@]} " } "
52
+ cmake --build . --parallel - t " ${BUILD_TARGETS[@]} " -- " ${BUILD_ARGS[@]+" ${BUILD_ARGS[@]} " } "
47
53
else
48
54
# Older versions of cmake can only build one target at a time with --target,
49
55
# and do not support -t shortcut
50
56
for t in " ${BUILD_TARGETS[@]} " ; do
51
- cmake --build . --target " $t " -- " ${BUILD_ARGS[@]+" ${BUILD_ARGS[@]} " } "
57
+ cmake --build . --parallel -- target " $t " -- " ${BUILD_ARGS[@]+" ${BUILD_ARGS[@]} " } "
52
58
done
53
59
fi
54
60
ctest --output-on-failure
You can’t perform that action at this time.
0 commit comments