Skip to content
Permalink
Browse files

Avoid re-splitting of arguments

  • Loading branch information...
hirschsn committed Nov 4, 2019
1 parent 0684d17 commit 3574e203e72ae3a5c62a4a21608c5b85f1b3c9b5
Showing with 12 additions and 12 deletions.
  1. +12 −12 src/python/pypresso.cmakein
@@ -54,50 +54,50 @@ fi
case $1 in
--gdb)
shift
[ "@PYTHON_FRONTEND@" = "@IPYTHON_EXECUTABLE@" ] && exec gdb -ex "set print thread-events off" -ex "set exec-wrapper sh -c 'exec \"@IPYTHON_EXECUTABLE@\" \"\$@\"'" --args "@PYTHON_EXECUTABLE@" $@
exec gdb --args @PYTHON_FRONTEND@ $@
[ "@PYTHON_FRONTEND@" = "@IPYTHON_EXECUTABLE@" ] && exec gdb -ex "set print thread-events off" -ex "set exec-wrapper sh -c 'exec \"@IPYTHON_EXECUTABLE@\" \"\$@\"'" --args "@PYTHON_EXECUTABLE@" "$@"
exec gdb --args @PYTHON_FRONTEND@ "$@"
;;
--lldb)
shift
exec lldb -- @PYTHON_FRONTEND@ $@
exec lldb -- @PYTHON_FRONTEND@ "$@"
;;
--valgrind)
shift
exec valgrind --leak-check=full @PYTHON_FRONTEND@ $@
exec valgrind --leak-check=full @PYTHON_FRONTEND@ "$@"
;;
--cuda-gdb)
shift
exec cuda-gdb --args @PYTHON_FRONTEND@ $@
exec cuda-gdb --args @PYTHON_FRONTEND@ "$@"
;;
--cuda-memcheck)
shift
exec cuda-memcheck @PYTHON_FRONTEND@ $@
exec cuda-memcheck @PYTHON_FRONTEND@ "$@"
;;
--gdb=*)
options="${1#*=}"
shift
[ "@PYTHON_FRONTEND@" = "@IPYTHON_EXECUTABLE@" ] && exec gdb -ex "set print thread-events off" -ex "set exec-wrapper sh -c 'exec \"@IPYTHON_EXECUTABLE@\" \"\$@\"'" ${options} --args "@PYTHON_EXECUTABLE@" $@
exec gdb ${options} --args @PYTHON_FRONTEND@ $@
[ "@PYTHON_FRONTEND@" = "@IPYTHON_EXECUTABLE@" ] && exec gdb -ex "set print thread-events off" -ex "set exec-wrapper sh -c 'exec \"@IPYTHON_EXECUTABLE@\" \"\$@\"'" ${options} --args "@PYTHON_EXECUTABLE@" "$@"
exec gdb ${options} --args @PYTHON_FRONTEND@ "$@"
;;
--lldb=*)
options="${1#*=}"
shift
exec lldb ${options} -- @PYTHON_FRONTEND@ $@
exec lldb ${options} -- @PYTHON_FRONTEND@ "$@"
;;
--valgrind=*)
options="${1#*=}"
shift
exec valgrind ${options} @PYTHON_FRONTEND@ $@
exec valgrind ${options} @PYTHON_FRONTEND@ "$@"
;;
--cuda-gdb=*)
options="${1#*=}"
shift
exec cuda-gdb ${options} --args @PYTHON_FRONTEND@ $@
exec cuda-gdb ${options} --args @PYTHON_FRONTEND@ "$@"
;;
--cuda-memcheck=*)
options="${1#*=}"
shift
exec cuda-memcheck ${options} @PYTHON_FRONTEND@ $@
exec cuda-memcheck ${options} @PYTHON_FRONTEND@ "$@"
;;
*)
exec @PYTHON_FRONTEND@ "$@"

0 comments on commit 3574e20

Please sign in to comment.
You can’t perform that action at this time.