Closed vkbo closed 3 years ago
@vkbo is this still an issue?
PR #419 addresses this for the GNU compiler and provides a method to do so for other compilers to cia the err_pattern
and warn_pattern
variables in cmplr.env
It is not feasible to set the grep to ^error
for all instances as some compilers produce messages that don't match that pattern.
I no longer use WaveWatch and I'm leaving the field in a couple of months, so for me it's no longer relevant. Whether the fix changes it or not, I can't say.
In any case, this strikes me as a very fragile solution for detecting compiler errors. A build system using for instance CMake would be the optimal solution, but I know from experience how much work it is to make such a change on a large Fortran code base. I've done it before.
@vkbo Thanks, we are moving towards CMake, so WW3 will be equipped with CMake build. I close the issue now.
Hi,
I just started using WW3, and I've spent the better part of a day trying to debug why my local test build fails. It turns out that the grep command that counts the number of errors reported in the .err file for one of the generated source files,
wmgridmd.F90
when using theIfremer1
switches, produces a false positive.The line detected as an error is the following:
This is obviously incorrect, and caused by the following two lines in the generated
comp
script (I usedGnu_debug
):This picks up the word
ERROR
in the echoed source code and counts it as a build error, causing an exit.Modifying the regex by requiring the keyword to be at the beginning of the line, solves this:
With this, the build completes with no error.
This form of error detection seems very fragile.