File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ CI_DIR=build-sanitize
33export CXX=clang++
44export CXXFLAGS=" -ggdb -Werror -Wall -Wextra -Wpedantic -Wthread-safety-analysis -Wno-unused-parameter -fsanitize=thread"
55CMAKE_ARGS=()
6- BUILD_ARGS=(-k -j4 )
6+ BUILD_ARGS=(-k)
77BUILD_TARGETS=(mptest)
Original file line number Diff line number Diff line change @@ -41,14 +41,23 @@ 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 but they are very verbose.
48+ cmake_args+=(--debug-find --debug-output --debug-trycompile --log-level=DEBUG)
49+ cmake " $src_dir " " ${cmake_args[@]} " || : " cmake exited with $? "
50+ cat CMakeFiles/CMakeConfigureLog.yaml || true
51+ find . -ls || true
52+ false
53+ fi
4554if ver_ge " $cmake_ver " " 3.15" ; then
46- cmake --build . -t " ${BUILD_TARGETS[@]} " -- " ${BUILD_ARGS[@]+" ${BUILD_ARGS[@]} " } "
55+ cmake --build . --parallel - t " ${BUILD_TARGETS[@]} " -- " ${BUILD_ARGS[@]+" ${BUILD_ARGS[@]} " } "
4756else
4857 # Older versions of cmake can only build one target at a time with --target,
4958 # and do not support -t shortcut
5059 for t in " ${BUILD_TARGETS[@]} " ; do
51- cmake --build . --target " $t " -- " ${BUILD_ARGS[@]+" ${BUILD_ARGS[@]} " } "
60+ cmake --build . --parallel -- target " $t " -- " ${BUILD_ARGS[@]+" ${BUILD_ARGS[@]} " } "
5261 done
5362fi
5463ctest --output-on-failure
You can’t perform that action at this time.
0 commit comments