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
4141mkdir -p " $CI_DIR "
4242cd " $CI_DIR "
4343git --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
4551if 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[@]} " } "
4753else
4854 # Older versions of cmake can only build one target at a time with --target,
4955 # and do not support -t shortcut
5056 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[@]} " } "
5258 done
5359fi
5460ctest --output-on-failure
You can’t perform that action at this time.
0 commit comments