diff --git a/projects/amdsmi/update_wrapper.sh b/projects/amdsmi/update_wrapper.sh index 918158dec4..87caead649 100755 --- a/projects/amdsmi/update_wrapper.sh +++ b/projects/amdsmi/update_wrapper.sh @@ -33,7 +33,7 @@ fi ENABLE_ESMI_LIB="" # source ENABLE_ESMI_LIB variable from the previous build if it exists if [ -e 'build/CMakeCache.txt' ]; then - GREP_RESULT=$(grep "ENABLE_ESMI_LIB" "${DIR}/build/CMakeCache.txt" | cut -d = -f 2) + GREP_RESULT=$(grep "ENABLE_ESMI_LIB.*=" "${DIR}/build/CMakeCache.txt" | tail -n 1 | cut -d = -f 2) ENABLE_ESMI_LIB="-DENABLE_ESMI_LIB=$GREP_RESULT" echo "ENABLE_ESMI_LIB: [$ENABLE_ESMI_LIB]" fi