summaryrefslogtreecommitdiff
path: root/setup_environment
diff options
context:
space:
mode:
authorDongdong Li <[email protected]>2013-08-02 15:03:20 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:50:58 -0700
commit5f91e7435742bab74dfbeca18afc63e466498f36 (patch)
tree967b92fe1bc9c9e8d22b2d101dad54ea9f5138a3 /setup_environment
parent4232b85d1ecd2f73cfc9e4226468c4b369476ca9 (diff)
Review: 76001: Setup environment quick fix for ubuntu
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 16725]
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);}'`