Skip to content
Snippets Groups Projects
Commit 30761df3 authored by Nicolas M. Thiéry's avatar Nicolas M. Thiéry
Browse files

Bug fix: le nom du programme était ignoré; Ajout options de compilation C++11, warnings

parent 2f739777
No related branches found
No related tags found
No related merge requests found
#!/bin/sh #!/bin/sh
CXXFLAGS="-std=c++11 -Wall -Wno-sign-compare"
usage () { usage () {
echo compile-and-run [program.cpp] echo compile-and-run [program.cpp]
echo echo
...@@ -13,7 +15,7 @@ if [ x"$1" = "x" ]; then ...@@ -13,7 +15,7 @@ if [ x"$1" = "x" ]; then
exit 0 exit 0
fi fi
if g++ prog.cpp; then if g++ $CXXFLAGS $1; then
./a.out ./a.out
else else
exit $? exit $?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment