summaryrefslogtreecommitdiff
path: root/setup_environment
diff options
context:
space:
mode:
Diffstat (limited to 'setup_environment')
-rw-r--r--setup_environment2
1 files changed, 1 insertions, 1 deletions
diff --git a/setup_environment b/setup_environment
index 4d9472d..f1a63f2 100644
--- a/setup_environment
+++ b/setup_environment
@@ -39,7 +39,7 @@ if [ $? = 1 ]; then
return;
fi
-CC_VERSION=`gcc --version | head -1 | awk '{for(i=1;i<=NF;i++){ if(match($i,/[0-9]\.[0-9]\.[0-9]/)) {print $i}}}'`
+CC_VERSION=`gcc --version | head -1 | awk '{for(i=1;i<=NF;i++){ if(match($i,/^[0-9]\.[0-9]\.[0-9]$/)) {print $i; exit 0}}}'`
CUDA_VERSION_STRING=`$CUDA_INSTALL_PATH/bin/nvcc --version | awk '/release/ {print $5;}' | sed 's/,//'`;
CUDA_VERSION_NUMBER=`echo $CUDA_VERSION_STRING | sed 's/\./ /' | awk '{printf("%02u%02u", 10*int($1), 10*$2);}'`