Skip to content

Commit 4720c16

Browse files
committed
ROOT Dictionary: Fix error handling in wrapper for dictionary generation
1 parent 8e63310 commit 4720c16

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cmake/rootcling_wrapper.sh.in

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,12 @@ LOGFILE=${DICTIONARY_FILE}.log
9292
${COMPILE_DEFINITIONS//;/ } \
9393
${PCMDEPS:+-m }${PCMDEPS//;/ -m } \
9494
${HEADERS//;/ } \
95-
> ${LOGFILE} 2>&1 || cat ${LOGFILE} >&2
95+
> ${LOGFILE} 2>&1 || ROOTCLINGRETVAL=$?
9696

97-
if [[ $? != "0" ]]; then
98-
rm $DICTIONARY_FILE
97+
if [[ ${ROOTCLINGRETVAL:-0} != "0" ]]; then
98+
cat ${LOGFILE} >&2
99+
rm -f $DICTIONARY_FILE
100+
echo "ROOT CLING Dictionary generation of $DICTIONARY_FILE failed with error code $ROOTCLINGRETVAL"
99101
exit 1
100102
fi
101103

0 commit comments

Comments
 (0)