diff --git a/paddle/scripts/check_env.sh b/paddle/scripts/check_env.sh index 564c1c09be352ae991675d4a8be5091facc98266..af16b84ca8a18151f0fa36d39fd201d3cab21a5f 100755 --- a/paddle/scripts/check_env.sh +++ b/paddle/scripts/check_env.sh @@ -150,7 +150,12 @@ echo "OS Version : `cat /etc/redhat-release`" echo "Kernel Release Version : `uname -r`" echo "Kernel Patch Version : `uname -v`" echo "GCC Version :`gcc --version | head -n 1|awk -F '\\\(GCC\\\)' '{print $2}'`" -echo "CMake Version :`cmake --version | head -n 1 | awk -F 'version' '{print $2}'`" +if command -v cmake >/dev/null 2>&1; then + cmake_ver=`cmake --version | head -n 1 | awk -F 'version' '{print $2}'` +else + cmake_ver=" Not installed" +fi +echo "CMake Version :$cmake_ver" echo "------------------ Environment Variables Information -------------------" kmp_affinity=`env | grep KMP_AFFINITY` omp_dynamic=`env | grep OMP_DYNAMIC`