From 6d719cf7ccb1cd6d958898cc11db528a334b9d39 Mon Sep 17 00:00:00 2001 From: Ryan Ofsky Date: Wed, 10 Sep 2025 07:06:21 -0400 Subject: [PATCH] ci: add cmake debug output --- ci/scripts/ci.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ci/scripts/ci.sh b/ci/scripts/ci.sh index 0022fd28..cc60a333 100755 --- a/ci/scripts/ci.sh +++ b/ci/scripts/ci.sh @@ -25,7 +25,16 @@ src_dir=$PWD mkdir -p "$CI_DIR" cd "$CI_DIR" export CMAKE_BUILD_PARALLEL_LEVEL="$(nproc)" -cmake "$src_dir" "${CMAKE_ARGS[@]+"${CMAKE_ARGS[@]}"}" +cmake_args=("${CMAKE_ARGS[@]+"${CMAKE_ARGS[@]}"}") +if ! cmake "$src_dir" "${cmake_args[@]}"; then + # If cmake failed, try it again with debug options. + # Could add --trace / --trace-expand here too but they are very verbose. + cmake_args+=(--debug-find --debug-output --debug-trycompile --log-level=DEBUG) + cmake "$src_dir" "${cmake_args[@]}" || : "cmake exited with $?" + cat CMakeFiles/CMakeConfigureLog.yaml || true + find . -ls || true + false +fi if ver_ge "$cmake_ver" "3.15"; then cmake --build . -t "${BUILD_TARGETS[@]}" -- "${BUILD_ARGS[@]+"${BUILD_ARGS[@]}"}" else