gcc add extensions

This commit is contained in:
Thomas Hobson 2021-04-24 19:46:36 +12:00
parent f72c51d614
commit dfdf8ce76e
No known key found for this signature in database
GPG Key ID: 9F1FD9D87950DB6F
1 changed files with 6 additions and 6 deletions

View File

@ -5,16 +5,16 @@
case "${PISTON_ALIAS}" in
gcc | c)
gcc -std=c11 "$@" -lm
rename 's/$/\.c/' "$@" # Add .c extension
gcc -std=c11 *.c -lm
;;
g++ | c++ | cpp)
g++ -std=c++17 "$@"
;;
gccgo | go)
gccgo "$@"
rename 's/$/\.cpp/' "$@" # Add .cpp extension
g++ -std=c++17 *.cpp
;;
gdc | d)
gdc "$@"
rename 's/$/\.d/' "$@" # Add .d extension
gdc *.d
;;
*)
echo "How did you get here? (${PISTON_ALIAS})"