From 24e887cb55d7d5efb039a0828ad58f546558a517 Mon Sep 17 00:00:00 2001 From: Tor Aamodt Date: Sun, 29 Jul 2012 08:59:23 -0800 Subject: cleaning Tim's edits up so can work on MacOS and avoid duplicating effort done by version_detection.mk [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 13573] --- setup_environment | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'setup_environment') diff --git a/setup_environment b/setup_environment index 7bcc48c..3e98dbc 100644 --- a/setup_environment +++ b/setup_environment @@ -26,7 +26,11 @@ export PATH=$GPGPUSIM_ROOT/bin:$CUDA_INSTALL_PATH/bin:$PATH # to run the debug build of GPGPU-Sim run: # source setup_environment debug -CUDA_VERSION=`nvcc --version | grep release | sed -re 's/.*release ([0-9]+\.[0-9]+).*/\1/'` +if [ `uname` = "Darwin" ]; then + CUDA_VERSION=`nvcc --version | grep release | sed -Ee 's/.*release ([0-9]+\.[0-9]+).*/\1/'` +else + CUDA_VERSION=`nvcc --version | grep release | sed -re 's/.*release ([0-9]+\.[0-9]+).*/\1/'` +fi if [ $# == '1' ] ; then export GPGPUSIM_CONFIG=$CUDA_VERSION/$1 -- cgit v1.3