Using GCC to compile C++ code: there's a big list of options (warnings, optimisations etc) I want to always compile with. It's tiresome to keep pasting them into the command line. Can I do something like
g++ test.cpp -o test.o -myoptions
where "-myoptions" would enable a list of options like
-pedantic
-Wall
-O2
-Wshadow
-...
that I've defined somewhere?
I've tried searching but couldn't find a guide for this. Is it possible or do I have to use make files? System is windows 7 if that's relevant. Thanks
edit: in case someone searches for this in the future, windows specific answer: go to control panel -> system -> advanced system settings -> environment variables, create new system variable named "myoptions" and value "-option1 -option2 -option3 ...". Then compile with "g++ test.cpp -o test.o %myoptions%"