2022-10-23 23:49:49 -05:00
|
|
|
#Compiles the entire program with debug flags then runs it in gdb. If the "test" argument is included, will try and run tests too (in the test folder)
|
2022-10-18 02:43:50 -05:00
|
|
|
#C++
|
|
|
|
printf "Running program...\n\n\n"
|
2022-10-23 23:49:49 -05:00
|
|
|
if [ "$1" = "test" ]
|
|
|
|
then
|
|
|
|
printf "Running tests...\n"
|
|
|
|
if g++ $(find . -type f -name "*.cpp") -g ${CUSTOM_PARAMS} -o ${PROJECT_NAME}; then
|
|
|
|
gdb ./${PROJECT_NAME} "$@"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if g++ $(find . -type f -name "*.cpp -not -path "./test/*") -g ${CUSTOM_PARAMS} -o ${PROJECT_NAME}; then
|
|
|
|
gdb ./${PROJECT_NAME} "$@"
|
|
|
|
fi
|
2022-10-18 02:43:50 -05:00
|
|
|
fi
|
|
|
|
printf "\n\n"
|