|
[Sponsors] |
April 13, 2015, 09:16 |
Passing compiler options to wmake?
|
#1 |
Senior Member
|
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 |
|
April 13, 2015, 10:06 |
|
#2 | |
Senior Member
|
Dear Bernhard,
Quote:
|
||
April 13, 2015, 19:36 |
|
#3 |
Senior Member
|
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 |
|
April 14, 2015, 03:14 |
|
#4 | |
Senior Member
|
Hi,
To avoid assumptions about compiler behavior one can look into manual: Quote:
And example, if I have these options: Code:
EXE_INC = \ ... -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -DFOAM_VERSION=${FOAM_VERSION} \ -Wreorder \ -Wno-undefined-bool-conversion Code:
In file included from myFoam.C:75: $HOME/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable 'maxDeltaT' [-Wunused-variable] scalar maxDeltaT = ^ 1 warning generated. Code:
EXE_INC = \ ... -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -DFOAM_VERSION=${FOAM_VERSION} \ -Wreorder \ -Wno-unused-variable \ -Wno-undefined-bool-conversion |
||
April 14, 2015, 05:01 |
|
#5 |
Senior Member
|
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! |
|
Tags |
options, wmake |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 | flakid | OpenFOAM Installation | 16 | December 28, 2010 09:48 |
Problems Installing OF 1.6 32 bit | bucksfan | OpenFOAM Installation | 19 | August 4, 2009 02:36 |
OpenFOAM15 installables are incomplete problem with paraFoam | tryingof | OpenFOAM Bugs | 17 | December 7, 2008 05:41 |
Problem of compilation OF 14Allwmake command not found | erik_d | OpenFOAM Bugs | 13 | September 13, 2008 22:45 |
[OpenFOAM] ParaFoam error message | joey | ParaView | 1 | October 2, 2006 14:28 |