[CMake] CTest error regex bug

David Cole david.cole at kitware.com
Wed May 18 10:57:56 EDT 2011


This is just ctest's way of helping you get rid of your warnings. All
warnings should be treated as errors... (Just joking, please don't flame...
:-)


git blame shows that line as having been last modified in 2004.
Specifically:

git blame -- Source/CTest/cmCTestBuildHandler.cxx

  8a2bedda (Ken Martin     2004-09-07 10:37:39 -0400   47)   "([^
:]+):([0-9]+): ([^ \\t])",

Regardless of the reason or justification, it's been that way for nearly 7
years. I would venture a guess to say that some old compiler from the
7-years-ago era had error output that matched such lines.

Better to "too aggressively" identify errors than to miss some.

You could use a custom error exception regex to avoid reporting these
warning lines as errors if you can't simply eliminate the warnings.

I'd rather not remove it as a built-in error regex unless the vast majority
of people listening in here speak up in opposition... Keeping it the same
means no change in behavior. Removing it means NOT matching some lines as
errors that are presently matched as errors -- bad news if it really is an
error line for somebody's build...


HTH,
David


On Wed, May 18, 2011 at 10:29 AM, Zach Mullen <zach.mullen at kitware.com>wrote:

> Hello,
>
> JC and I discovered some weird behavior in CTest where some warnings were
> being reported as errors in Build.xml.  After some digging I found that the
> output was matching one of the cmCTestErrorMatches, specifically "([^
> :]+):([0-9]+): ([^ \\t])".
>
> This is occurring on gcc 4.2.1 on a mac.  What's the justification for
> having this as an error regex?
>
> Attached the relevant part of Build.xml.
>
>
> <Error>
> <BuildLogLine>5438</BuildLogLine>
> <Text> /usr/include/secure/_stdio.h:67:1: ,
> </Text>
> <SourceFile>/Users/kitware/Dashboards/Nightly/Slicer-build-64bits-QT4.7-PythonQt-With-Tcl-NoCLI-Release-nightly/
> /usr/include/secure/_stdio.h</SourceFile>
>  <SourceLineNumber>67</SourceLineNumber>
> <PreContext>                 from
> /.../Slicer-build-64bits-QT4.7-PythonQt-With-Tcl-NoCLI-Release-nightly/cmcurl/setup.h:101,
> -- Performing Test HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC - Success
> -- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
> [ 20%] yes
> Building C object SRC/CMakeFiles/lapack.dir/sspevd.c.o
> checking for mode_t... yes
>                  from
> /.../Slicer-build-64bits-QT4.7-PythonQt-With-Tcl-NoCLI-Release-nightly/cmcurl/setup.h:101/.../Slicer-build-64bits-QT4.7-PythonQt-With-Tcl-NoCLI-Release-nightly/cmcurl/slicerlibcurl/slicerlibcurl/mprintf.h:48:1:,
>                  from
> /.../Slicer-build-64bits-QT4.7-PythonQt-With-Tcl-NoCLI-Release-nightly/cmcurl/hostsyn.c:24
> :
> </PreContext>
> <PostContext>                 from
> /.../Slicer-build-64bits-QT4.7-PythonQt-With-Tcl-NoCLI-Release-nightly/cmcurl/hostthre.c:24warning:
> In file included from
> /.../Slicer-build-64bits-QT4.7-PythonQt-With-Tcl-NoCLI-Release-nightly/cmcurl/http_digest.c:44:
> warning: :
> warning: this is the location of the previous
> definition/.../Slicer-build-64bits-QT4.7-PythonQt-With-Tcl-NoCLI-Release-nightly/cmcurl/slicerlibcurl/slicerlibcurl/mprintf.h:49:1:/usr/include/secure/_stdio.h:60:1:"vsprintf"
> redefined
>
> checking for pid_t... [ 20%] Building C object
> SRC/CMakeFiles/lapack.dir/sspevx.c.o
> yes
> checking for size_t... yes
> checking for uid_t in sys/types.h... yes
> checking pw_gecos in struct pwd... -- Performing Test
> HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC - Success
> [ 20%] -- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC</PostContext>
> <RepeatCount>0</RepeatCount>
> </Error>
>
> Thanks,
>
> --
> Zach Mullen
> R & D Engineer
> Kitware Inc.
> (919) 969-6990 x314
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110518/c535b7d5/attachment-0001.htm>


More information about the CMake mailing list