summaryrefslogtreecommitdiff
path: root/setup_environment
diff options
context:
space:
mode:
authorTim Rogers <[email protected]>2011-11-16 22:14:51 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:18:25 -0700
commit5534e13a1597d5393856f8a2b8e2f518a772814a (patch)
tree3515ef954681a7d33b06e4f7f97917e1d7a92cc6 /setup_environment
parent4df93ec40be870e3a4d253bb58185afaa72a5b90 (diff)
Removing config_setup and changing setup_environment to allow for a better way to enable the debug build
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 10968]
Diffstat (limited to 'setup_environment')
-rw-r--r--setup_environment17
1 files changed, 9 insertions, 8 deletions
diff --git a/setup_environment b/setup_environment
index d1dcff3..a7213ba 100644
--- a/setup_environment
+++ b/setup_environment
@@ -1,13 +1,13 @@
# see README before running this
-# uncomment the line with debug if you want to run GPGPU-Sim in gdb
-# Alternatively you can run:
-# ./config_setup debug
-# or
-# ./config_setup release
-# This avoids extending your LD_LIBRARY_PATH when changing the configuration
-export GPGPUSIM_CONFIG=release
-# export GPGPUSIM_CONFIG=debug
+# to run the debug build of GPGPU-Sim run:
+# source setup_environment debug
+if [ $# == '1' ] ;
+then
+ export GPGPUSIM_CONFIG=$1
+else
+ export GPGPUSIM_CONFIG=release
+fi
export GPGPUSIM_ROOT="$( cd "$( dirname "$BASH_SOURCE" )" && pwd )"
@@ -36,6 +36,7 @@ export CUDA_INSTALL_PATH=/usr/local/cuda/
# native CUDA and OpenCL applications. GPGPU-Sim is dynamically linked
# against instead of the CUDA toolkit. This replaces this cumbersome
# static link setup in prior GPGPU-Sim releases.
+export LD_LIBRARY_PATH=`echo $LD_LIBRARY_PATH | sed -re 's/.*gpgpu_sim.*(release|debug)://'`
export LD_LIBRARY_PATH=$GPGPUSIM_ROOT/lib/$GPGPUSIM_CONFIG:$LD_LIBRARY_PATH
export PATH=$GPGPUSIM_ROOT/bin:$CUDA_INSTALL_PATH/bin:$PATH