Skip to content

Commit 21aa955

Browse files
authored
Merge branch 'main' into change_copy_rights_to_2025
2 parents e9a8ca6 + 888fbfb commit 21aa955

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/build_cudaq.sh

+9
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,18 @@ cmake_args="-G Ninja '"$repo_root"' \
176176
# here, but keep the definition for CMAKE_CUDA_HOST_COMPILER.
177177
if $verbose; then
178178
echo $cmake_args | xargs cmake
179+
status=$?
179180
else
180181
echo $cmake_args | xargs cmake \
181182
2> logs/cmake_error.txt 1> logs/cmake_output.txt
183+
status=$?
184+
fi
185+
186+
# Check if cmake succeeded
187+
if [ "$status" -ne 0 ]; then
188+
echo -e "\e[01;31mError: CMake configuration failed. Please check logs/cmake_error.txt for details.\e[0m" >&2
189+
cat logs/cmake_error.txt >&2
190+
cd "$working_dir" && (return 0 2>/dev/null) && return 1 || exit 1
182191
fi
183192

184193
# Build and install CUDA-Q

0 commit comments

Comments
 (0)