Closed wenqing closed 5 years ago
@bilke Please take a look at the changes in ThirdParty/CMakeLists.txt, which disable compilation warnings in ThirdParty.
@wenqing Instead of setting the cxx flags are more modern CMake approach is to use add_compile_options()
, e.g.:
add_compile_options(
-Wno-unused-result
-Wno-unused-variable
-Wno-unused-but-set-variable
-Wno-unused-parameter
-Wno-sign-compare
-Wno-format
-Wno-extra
)
Or simply disable all warnings: add_compile_options(-w)
?
I also suggest to just set this once for all targets in ThirdParty, i.e. not inside the if()
clauses, e.g. if(OGS_CHEMSOLVER STREQUAL IPQC)
.
@bilke Took
add_compile_options(
-Wno-unused-result
-Wno-unused-variable
-Wno-unused-but-set-variable
-Wno-unused-parameter
-Wno-sign-compare
-Wno-format
-Wno-extra
)
for ThirdParty/CMakeLists.txt.
Now, Parallel Stage / Win has problem:
java.nio.channels.ClosedChannelException
Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from 141.65.34.105/141.65.34.105:58676
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
at hudson.remoting.Request.call(Request.java:202)
@wenqing I restarted the Win build which ran fine.
If you like I can enable warning thresholds for the current state, e.g. 0 for FEM, 4 for PETSc, and so on. Or do you want to fix a few of the remaining warnings before setting the threshold?
@bilke It is nice that you can enable warning thresholds for the current state. Please go forward. With the current compilation options, this PR does not give compilation warnings. I prefer to fix the remaining warnings after setting the threshold.
as titled.
Besides, it fixes some warnings in the files in OGS.