Passing compiler options to wmake?
Dear all,
while I am sure that most warnings during compilation can be mitigated by perfect code, sometimes it might be advantageous during debugging to add some additional compiler options. For example during compiling of some code, wmake suggests to use "-Wreorder" as a compiler option. Alas, just running "wmake -Wreorder" does fail, telling me "-Wreorder" was an unknown option. Thus my question is: How can I pass on g++-options to the compilation with wmake? Thanks for your answers already in advance! Cheers, Bernhard |
Dear Bernhard,
Quote:
|
Thanks a lot for your message. Unfortunately it did not work. Seems, the options in brackets behind the compiler-warnings either were wrong or did come from something different...
If for example there is OpenFOAM/OpenFOAM-2.3.x_latest/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [-Wunused-variable] I would assume "-Wunused-variable" says what compiler option would switch of this warning. But it definitely took the included options into account, as it checked them for right spelling (--Wreorder brought up an error, as it did not accept the double - in front). Further ideas? Cheers, Bernhard |
Hi,
To avoid assumptions about compiler behavior one can look into manual: Quote:
And example, if I have these options: Code:
EXE_INC = \ Code:
In file included from myFoam.C:75: Code:
EXE_INC = \ |
Gosh, I always thought I was capable of thinking and remembering the famous four letter-paradigm of programming - rtfm.
But it seems sometime a reminder - moreover such a helpful one - is quite in place! ;-) Thanks a lot, by now I know my warnings and compiler messages were of a low-urgency magnitude! |
All times are GMT -4. The time now is 00:17. |